All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] drm/i915/guc: Fix requests of a banned context never completing
@ 2026-11-16 11:59 Javier MV
  2026-11-16 11:59 ` [PATCH v3 1/2] drm/i915/guc: Complete all requests of a non-schedulable context Javier MV
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Javier MV @ 2026-11-16 11:59 UTC (permalink / raw)
  To: intel-gfx
  Cc: Javier MV, jani.nikula, joonas.lahtinen, rodrigo.vivi, tursulin,
	matthew.brost, daniele.ceraolospurio, umesh.nerlige.ramappa

From: Javier MV <javiermv@duck.com>

On ADL-P with GuC submission, a GuC context reset during a request watchdog
cancellation can leave the context's requests incomplete forever: the client
hangs on its fences and, once killed, its buffers stay pinned until reboot
(7.5 GB here). Reported in
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15301.

Sequence (llama.cpp Vulkan compute, request_timeout_ms=2000,
preempt_timeout_ms=7500):
 1. The watchdog blocks the context to cancel a request.
 2. GuC can't preempt the compute work and resets the context. i915 bans it
    and unwinds its requests.
 3. The late schedule disable done clears SCHED_STATE_BANNED, and unblock
    re-enables the banned context.
 4. GuC resets it again at the first preemption. That reset is ignored, and
    after a full GT reset the dequeue completes only the last of its merged
    requests.

Patch 1 completes all of them once the context is off the HW. Patch 2 stops
unblock from re-enabling a non-schedulable context.

Tested on i5-1235U (8086:46a8), GuC 70.36.0, Ubuntu 7.0.0-42 (the touched
code is identical in mainline). Without the series: 5 hangs in 17 runs, one
leaked. With v2: 30 runs, 4 hangs, all contained (VK_ERROR_DEVICE_LOST,
nothing pinned). v3 changes only text.

I can reproduce this (a hang every 10 to 30 runs) and test other approaches.
Logs and error states are in the issue.

I have an extra patch that cancels the requests when a banned context gets
another reset notification. It never ran in my tests, so I left it out.

Written with Claude Code (Opus 5.5). I ran the tests and reviewed the patches.

v3: shorter commit messages and comments (Rodrigo), rebased on v7.4-rc3.
v2: fix a use-after-free in patch 1; patch 2 also covers exiting contexts
    (Sashiko).
v2: https://lore.kernel.org/intel-gfx/20261111135753.11071-1-javiermv@gmail.com/
v1: https://lore.kernel.org/intel-gfx/20261110122534.12989-1-javiermv@gmail.com/

Patchwork CI didn't run on v1 or v2 (my address isn't on the CI allowlist). If
someone can trigger it for this version, I'd appreciate it.

Javier MV (2):
  drm/i915/guc: Complete all requests of a non-schedulable context
  drm/i915/guc: Don't unblock a non-schedulable context

 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.51.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-16 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 11:59 [PATCH v3 0/2] drm/i915/guc: Fix requests of a banned context never completing Javier MV
2026-11-16 11:59 ` [PATCH v3 1/2] drm/i915/guc: Complete all requests of a non-schedulable context Javier MV
2026-11-16 12:40   ` sashiko-bot
2026-11-16 11:59 ` [PATCH v3 2/2] drm/i915/guc: Don't unblock " Javier MV
2026-11-16 14:18 ` ✗ LGCI.VerificationFailed: failure for drm/i915/guc: Fix requests of a banned context never completing (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.