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>,
"Matthew Auld" <matthew.auld@intel.com>
Subject: [PATCH v2 3/6] drm/xe/migrate: avoid interruptible waits once passes are in flight
Date: Fri, 27 Nov 2026 12:14:13 +0000 [thread overview]
Message-ID: <20261127-migrate-bb-optimise-v2-3-808d0d520ddb@intel.com> (raw)
In-Reply-To: <20261127-migrate-bb-optimise-v2-0-808d0d520ddb@intel.com>
Once at least one pass has been submitted in xe_migrate_clear() or
__xe_migrate_copy() (fence != NULL), aborting a later pass with
-ERESTARTSYS when the bb pool is full still has to wait uninterruptibly
in err_sync for all in-flight passes to complete, only to discard that
work and restart the entire transfer from scratch.
Only wait interruptibly on the first pass (!fence && intr).
v2:
- Add Fixes/stable tags (Thomas)
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9644
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: <stable@vger.kernel.org> # v6.12+
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/xe/xe_migrate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index cab2a26921e4..31392e7957ea 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -1401,7 +1401,7 @@ static struct dma_fence *__xe_migrate_copy(struct xe_migrate *m,
batch_size += ((copy_only_ccs) ? 0 : emit_copy_cmd_len(xe)) +
((needs_ccs_emit ? EMIT_COPY_CCS_DW : 0));
- bb = __xe_bb_new(gt, batch_size, usm, intr);
+ bb = __xe_bb_new(gt, batch_size, usm, !fence && intr);
if (IS_ERR(bb)) {
err = PTR_ERR(bb);
goto err_sync;
@@ -2070,7 +2070,7 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
if (WARN_ON_ONCE(!clear_L0))
break;
- bb = __xe_bb_new(gt, batch_size, usm, intr);
+ bb = __xe_bb_new(gt, batch_size, usm, !fence && intr);
if (IS_ERR(bb)) {
err = PTR_ERR(bb);
goto err_sync;
--
2.56.1
next prev parent reply other threads:[~2026-11-27 12:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 12:14 [PATCH v2 0/6] Interruptible bb wait + related bits Matthew Auld
2026-11-27 12:14 ` [PATCH v2 1/6] drm/xe/sa: allow callers to specify interruptible suballocator waits Matthew Auld
2026-11-27 12:14 ` [PATCH v2 2/6] drm/xe/migrate: plumb interruptible wait flag to clear and copy Matthew Auld
2026-11-27 12:14 ` Matthew Auld [this message]
2026-11-27 12:14 ` [PATCH v2 4/6] drm/xe/migrate: optimise chunk sizes for identity VRAM clears Matthew Auld
2026-11-27 12:14 ` [PATCH v2 5/6] drm/xe/bb: drop per-batch prefetch padding Matthew Auld
2026-11-27 12:33 ` sashiko-bot
2026-11-27 12:14 ` [PATCH v2 6/6] drm/xe/sa: remove unused shadow BO and two-step bb helpers Matthew Auld
2026-11-27 12:27 ` ✓ CI.KUnit: success for Interruptible bb wait + related bits (rev2) 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=20261127-migrate-bb-optimise-v2-3-808d0d520ddb@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--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