]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "drm/pagemap: Disable device-to-device migration"
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 11 Feb 2026 10:41:59 +0000 (11:41 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 4 Mar 2026 13:53:37 +0000 (08:53 -0500)
With commit
a69d1ab971a6 ("mm: Fix a hmm_range_fault() livelock / starvation problem")
device-to-device migration is not functional again and the
disabling can be reverted.

Add the above commit as a Fixes: tag in order for the revert to not
take place unless that commit is present.

This reverts commit 10dd1eaa80a56d3cf6d7c36b5269c8fed617f001.

Cc: Matthew Brost <matthew.brost@intel.com>
Fixes: b570f37a2ce4 ("mm: Fix a hmm_range_fault() livelock / starvation problem")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260211104159.114947-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit 1a3c0049b3f56278c9caf2784c53f6ab435fd12c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
[Rodrigo updated Fixes tag]

drivers/gpu/drm/drm_pagemap.c

index bdc79140875cf68973a047f78108337c4b94b6f3..862675ac5bb2104816304499a09f5ce626861a97 100644 (file)
@@ -480,18 +480,8 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
                .start          = start,
                .end            = end,
                .pgmap_owner    = pagemap->owner,
-               /*
-                * 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,
+               .flags          = MIGRATE_VMA_SELECT_SYSTEM | MIGRATE_VMA_SELECT_DEVICE_COHERENT |
+               MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
        };
        unsigned long i, npages = npages_in_range(start, end);
        unsigned long own_pages = 0, migrated_pages = 0;