From: Alistair Popple <apopple@nvidia.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: akpm@linux-foundation.org, balbirs@nvidia.com,
matthew.brost@intel.com, thomas.hellstrom@linux.intel.com,
jhubbard@nvidia.com, jgg@ziepe.ca, linux-mm@kvack.org
Subject: Re: [PATCH] mm/migrate_device: remove dead migration entry check in migrate_vma_collect_huge_pmd()
Date: Thu, 12 Feb 2026 13:00:58 +1100 [thread overview]
Message-ID: <k3v2ldtu36n3udzziadwxbyj3tsrqwtrwardx3zw6nuuewcozf@wquljsyxdy3b> (raw)
In-Reply-To: <20260212014611.416695-1-dave@stgolabs.net>
On 2026-02-12 at 12:46 +1100, Davidlohr Bueso <dave@stgolabs.net> wrote...
> 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.
Heh. You beat me by 10 minutes :-) I was just checking to see if the fix had
already been sent before pressing send on mine.
You probably want to add:
Fixes: a30b48bf1b244 ("mm/migrate_device: implement THP migration of zone device pages")
But other than that this looks good so:
Reviewed-by: Alistair Popple <apopple@nvidia.com>
> 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 prev parent reply other threads:[~2026-02-12 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 1:46 Davidlohr Bueso
2026-02-12 2:00 ` Alistair Popple [this message]
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=k3v2ldtu36n3udzziadwxbyj3tsrqwtrwardx3zw6nuuewcozf@wquljsyxdy3b \
--to=apopple@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=balbirs@nvidia.com \
--cc=dave@stgolabs.net \
--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