From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
stable@vger.kernel.org
Subject: [PATCH 1/2] drm/xe/sa: make suballocator waits uninterruptible
Date: Thu, 22 Oct 2026 18:41:00 +0100 [thread overview]
Message-ID: <20261022174058.226432-5-matthew.auld@intel.com> (raw)
In-Reply-To: <20261022174058.226432-4-matthew.auld@intel.com>
Large BO clears and copies in xe_migrate_clear() and xe_migrate_copy()
are split into multiple passes, each needing a batchbuffer from the
fixed size kernel bb pool. Once the pool fills up, __xe_sa_bo_new()
waits interruptibly for space, so a pending signal (e.g. Xorg's 5ms
SIGALRM smart-scheduler timer) makes it fail mid-loop with -ERESTARTSYS.
The partial progress is then thrown away and the restarted ioctl starts
again from byte 0, including the memory allocation, which can livelock
if the signal arrives faster than the whole operation completes. In the
shrinker path the same error also aborts the shrinker walk, even though
ctx->interruptible is false.
Being interruptible here doesn't seem to buy much anyway: on error
the loop already waits uninterruptibly for all submitted passes before
returning. So just make the suballocator waits uninterruptible, matching
amdgpu and radeon. The other users (page reclaim from a kworker, and the
GuC buffer cache) shouldn't really see any meaningful change.
Assisted-by: LLM
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9644
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.12+
---
drivers/gpu/drm/xe/xe_sa.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c
index f32045f40b7a..d9c2b28b08c2 100644
--- a/drivers/gpu/drm/xe/xe_sa.c
+++ b/drivers/gpu/drm/xe/xe_sa.c
@@ -165,7 +165,8 @@ void xe_sa_bo_sync_shadow(struct drm_suballoc *sa_bo)
* @size: number of bytes we want to suballocate
* @gfp: gfp flags used for memory allocation. Typically GFP_KERNEL.
*
- * Try to make a suballocation of size @size.
+ * Try to make a suballocation of size @size. Any waits for space are
+ * uninterruptible.
*
* Return: a &drm_suballoc, or an ERR_PTR.
*/
@@ -178,7 +179,7 @@ struct drm_suballoc *__xe_sa_bo_new(struct xe_sa_manager *sa_manager, u32 size,
if (size > sa_manager->base.size)
return ERR_PTR(-ENOBUFS);
- return drm_suballoc_new(&sa_manager->base, size, gfp, true, 0);
+ return drm_suballoc_new(&sa_manager->base, size, gfp, false, 0);
}
/**
--
2.56.0
next prev parent reply other threads:[~2026-10-22 17:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 17:40 [PATCH 0/2] Uninterruptible bb wait + cleanup Matthew Auld
2026-10-22 17:41 ` Matthew Auld [this message]
2026-10-22 18:29 ` [PATCH 1/2] drm/xe/sa: make suballocator waits uninterruptible Thomas Hellström
2026-10-23 9:32 ` Matthew Auld
2026-10-27 12:42 ` Matthew Auld
2026-10-22 17:41 ` [PATCH 2/2] drm/xe/sa: remove unused shadow BO and two-step bb helpers Matthew Auld
2026-10-22 17:49 ` ✓ CI.KUnit: success for Uninterruptible bb wait + cleanup Patchwork
2026-10-22 18:27 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-23 0:56 ` ✗ Xe.CI.FULL: failure " 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=20261022174058.226432-5-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=stable@vger.kernel.org \
--cc=thomas.hellstrom@linux.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