diff options
| author | Jagmeet Randhawa <jagmeet.randhawa@intel.com> | 2026-10-20 19:07:05 +0000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2026-11-09 19:18:01 +1000 |
| commit | eb1f465e9119f7680458218a63bbb8d32844908e (patch) | |
| tree | 8c86c54529d19f8433125345b7341b68092199f6 /rust/kernel/alloc/kvec/errors.rs | |
| parent | a869bd4d65bc131082568743418b3876c46c3b7b (diff) | |
drm/xe/guc: Do not attribute a TDR disable to a pending suspend
handle_sched_done() treats any SCHED_DONE with runnable_state 0 as the
completion of a suspend whenever q->guc->suspend_pending is set. That is
not sufficient to tell apart the two producers of a scheduling disable.
When a queue is suspended, __guc_exec_queue_suspend() sets
suspend_pending and queues a SUSPEND message. If a job times out before
that message runs, guc_exec_queue_timedout_job() stops submission, which
traps the message, bans the queue and issues a disable of its own via
disable_scheduling(). When the GuC acknowledges that disable,
suspend_pending is still set, so handle_sched_done() misattributes the
reply to the trapped SUSPEND message.
This signals the suspend fence for a queue that was never suspended,
tripping the exec_queue_suspended() assert in suspend_fence_signal(), and
skips the wake_up_all() the TDR is waiting on, so the TDR stalls for its
full 5s timeout and then triggers an unnecessary GT reset.
The suspend path marks the queue suspended before disabling scheduling,
and a trapped SUSPEND message never does, so exec_queue_suspended()
distinguishes the two cases. Use it to qualify the attribution, the same
way the VF migration replay path already does. The trapped message is not
lost: it completes the suspend once submission restarts at the end of the
TDR.
While here, wake guc->ct.wq after clearing pending_disable rather than
before, so a waiter observes the updated state on its first re-check, and
wake unconditionally since the suspend and destroy paths have waiters too.
v2: Rebase onto drm-xe-next. The suspend_pending check moved under
sched->msg_lock in commit cf4171a20d13 ("drm/xe/guc: Fix race
around q->guc->suspend_pending access"), so the
exec_queue_suspended() qualification is folded into that locked
snapshot rather than reinstating an unlocked check. No functional
change from v1.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20261020190705.20127-1-jagmeet.randhawa@intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
