From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: himal.prasad.ghimiray@intel.com, francois.dugast@intel.com,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: [PATCH 2/2] drm/pagemap: Disable device-to-device migration
Date: Wed, 7 Jan 2026 10:27:16 -0800 [thread overview]
Message-ID: <20260107182716.2236607-3-matthew.brost@intel.com> (raw)
In-Reply-To: <20260107182716.2236607-1-matthew.brost@intel.com>
Device-to-device migration is causing xe_exec_system_allocator --r
*race*no* to intermittently fail with engine resets and a kernel hang on
a page lock. This should work but is clearly buggy somewhere. Disable
device-to-device migration in the interim until the issue can be
root-caused.
The only downside of disabling device-to-device migration is that memory
will bounce through system memory during migration. However, this path
should be rare, as it only occurs when madvise attributes are changed or
atomics are used.
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Fixes: ec265e1f1cfc ("drm/pagemap: Support source migration over interconnect")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/drm_pagemap.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index aa43a8475100..03ee39a761a4 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -480,8 +480,18 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
.start = start,
.end = end,
.pgmap_owner = pagemap->owner,
- .flags = MIGRATE_VMA_SELECT_SYSTEM | MIGRATE_VMA_SELECT_DEVICE_COHERENT |
- MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
+ /*
+ * FIXME: MIGRATE_VMA_SELECT_DEVICE_PRIVATE intermittently
+ * causes 'xe_exec_system_allocator --r *race*no*' to trigger aa
+ * engine reset and a hard hang due to getting stuck on a folio
+ * lock. This should work and needs to be root-caused. The only
+ * downside of not selecting MIGRATE_VMA_SELECT_DEVICE_PRIVATE
+ * is that device-to-device migrations won’t work; instead,
+ * memory will bounce through system memory. This path should be
+ * rare and only occur when the madvise attributes of memory are
+ * changed or atomics are being used.
+ */
+ .flags = MIGRATE_VMA_SELECT_SYSTEM | MIGRATE_VMA_SELECT_DEVICE_COHERENT,
};
unsigned long i, npages = npages_in_range(start, end);
unsigned long own_pages = 0, migrated_pages = 0;
--
2.34.1
next prev parent reply other threads:[~2026-01-07 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 18:27 [PATCH 0/2] Fix a couple drm_pagemap issues with multi-GPU Matthew Brost
2026-01-07 18:27 ` [PATCH 1/2] drm/pagemap Fix error paths in drm_pagemap_migrate_to_devmem Matthew Brost
2026-01-07 20:40 ` Francois Dugast
2026-01-07 18:27 ` Matthew Brost [this message]
2026-01-07 20:05 ` [PATCH 2/2] drm/pagemap: Disable device-to-device migration Francois Dugast
2026-01-07 18:42 ` ✓ CI.KUnit: success for Fix a couple drm_pagemap issues with multi-GPU Patchwork
2026-01-07 19:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-07 21:53 ` ✗ 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=20260107182716.2236607-3-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=francois.dugast@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.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