linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbirs@nvidia.com>
To: Davidlohr Bueso <dave@stgolabs.net>, akpm@linux-foundation.org
Cc: matthew.brost@intel.com, apopple@nvidia.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: Fri, 13 Feb 2026 08:16:13 +1100	[thread overview]
Message-ID: <01499626-347a-4258-bdb1-c1cc67172cd2@nvidia.com> (raw)
In-Reply-To: <20260212014611.416695-1-dave@stgolabs.net>

On 2/12/26 12:46, Davidlohr Bueso 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.
> 
> 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 {

Acked-by: Balbir Singh <balbirs@nvidia.com>


      parent reply	other threads:[~2026-02-12 21:16 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
2026-02-12 12:37 ` David Hildenbrand (Arm)
2026-02-12 21:16 ` Balbir Singh [this message]

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=01499626-347a-4258-bdb1-c1cc67172cd2@nvidia.com \
    --to=balbirs@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@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