public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: accel/amdxdna: Check for device hang on job timeout
Date: Sun, 12 Apr 2026 10:41:19 +1000	[thread overview]
Message-ID: <review-overall-20260409175826.195665-1-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260409175826.195665-1-lizhi.hou@amd.com>

Overall Series Review

Subject: accel/amdxdna: Check for device hang on job timeout
Author: Lizhi Hou <lizhi.hou@amd.com>
Patches: 2
Reviewed: 2026-04-12T10:41:19.407531

---

This is a single patch that adds Timeout Detection and Recovery (TDR) forward-progress checking to the amdxdna accelerator driver. The core idea is sound: instead of treating every scheduler timeout as a device hang, the driver checks whether the device has made forward progress (submitted or completed any job) since the last timeout check. If it has, the timeout handler returns `DRM_GPU_SCHED_STAT_NO_HANG` rather than resetting the context.

However, the implementation has several significant issues that should be addressed before merging:

1. **Global-level tracking for per-context schedulers** — the `tdr_status` field lives on the global `amdxdna_dev_hdl`, but each hardware context has its own `drm_gpu_scheduler`. A job completing in context A will prevent context B from ever detecting a hang.
2. **Module parameter type mismatch** — declared `uint` but registered as `int`.
3. **Non-static global variable** pollutes the module namespace.
4. **Missing initialization** of `tdr_status`.
5. **The timeout change from 60s to 2s is smuggled into this patch** with minimal justification.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-04-12  0:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 17:58 [PATCH V1] accel/amdxdna: Check for device hang on job timeout Lizhi Hou
2026-04-10 20:37 ` Mario Limonciello
2026-04-12  0:41 ` Claude review: " Claude Code Review Bot
2026-04-12  0:41 ` Claude Code Review Bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-overall-20260409175826.195665-1-lizhi.hou@amd.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox