linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/migrate_device: remove dead migration entry check in migrate_vma_collect_huge_pmd()
@ 2026-02-12  1:46 Davidlohr Bueso
  2026-02-12  2:00 ` Alistair Popple
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2026-02-12  1:46 UTC (permalink / raw)
  To: akpm
  Cc: balbirs, matthew.brost, apopple, thomas.hellstrom, jhubbard, jgg,
	linux-mm, Davidlohr Bueso

The softleaf_is_migration() check is unreachable as entries that are not
device_private are filtered out. Similarly, the PTE-level equivalent in
migrate_vma_collect_pmd() skips migration entries.

This dead branch also contained a double spin_unlock(ptl) bug.

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 mm/migrate_device.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mm/migrate_device.c b/mm/migrate_device.c
index c2855235fd9a..b40c1d49677d 100644
--- a/mm/migrate_device.c
+++ b/mm/migrate_device.c
@@ -175,13 +175,6 @@ static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start,
 			return migrate_vma_collect_skip(start, end, walk);
 		}
 
-		if (softleaf_is_migration(entry)) {
-			migration_entry_wait_on_locked(entry, ptl);
-			spin_unlock(ptl);
-			return -EAGAIN;
-		}
-
 		if (softleaf_is_device_private_write(entry))
 			write = MIGRATE_PFN_WRITE;
 	} else {
--
2.39.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-12 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-12  1:46 [PATCH] mm/migrate_device: remove dead migration entry check in migrate_vma_collect_huge_pmd() Davidlohr Bueso
2026-02-12  2:00 ` Alistair Popple
2026-02-12 12:37 ` David Hildenbrand (Arm)
2026-02-12 21:16 ` Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox