From: Davidlohr Bueso <dave@stgolabs.net>
To: akpm@linux-foundation.org
Cc: balbirs@nvidia.com, matthew.brost@intel.com, apopple@nvidia.com,
thomas.hellstrom@linux.intel.com, jhubbard@nvidia.com,
jgg@ziepe.ca, linux-mm@kvack.org,
Davidlohr Bueso <dave@stgolabs.net>
Subject: [PATCH] mm/migrate_device: remove dead migration entry check in migrate_vma_collect_huge_pmd()
Date: Wed, 11 Feb 2026 17:46:11 -0800 [thread overview]
Message-ID: <20260212014611.416695-1-dave@stgolabs.net> (raw)
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
next reply other threads:[~2026-02-12 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 1:46 Davidlohr Bueso [this message]
2026-02-12 2:00 ` Alistair Popple
2026-02-12 12:37 ` David Hildenbrand (Arm)
2026-02-12 21:16 ` Balbir Singh
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=20260212014611.416695-1-dave@stgolabs.net \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-mm@kvack.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