From: Javier MV <javiermv@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Javier MV <javiermv@duck.com>,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tursulin@ursulin.net,
matthew.brost@intel.com, daniele.ceraolospurio@intel.com,
umesh.nerlige.ramappa@intel.com
Subject: [PATCH v3 0/2] drm/i915/guc: Fix requests of a banned context never completing
Date: Mon, 16 Nov 2026 11:59:46 +0000 [thread overview]
Message-ID: <20261116115958.9499-1-javiermv@gmail.com> (raw)
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
next reply other threads:[~2026-11-16 12:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 11:59 Javier MV [this message]
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
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=20261116115958.9499-1-javiermv@gmail.com \
--to=javiermv@gmail.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=javiermv@duck.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@ursulin.net \
--cc=umesh.nerlige.ramappa@intel.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