linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	peterx@redat.com, John Hubbard <jhubbard@nvidia.com>,
	Ralph Campbell <rcampbell@nvidia.com>
Subject: Re: [PATCH] mm/migrate_device.c: Fix a misleading and out-dated comment
Date: Mon, 29 Aug 2022 11:30:35 -0400	[thread overview]
Message-ID: <YwzbmwvvgDxHlRau@xz-m1.local> (raw)
In-Reply-To: <87tu5v7blr.fsf@nvdebian.thelocal>

On Mon, Aug 29, 2022 at 05:09:25PM +1000, Alistair Popple wrote:
> So how about the following:
> 
> 		/*
> 		 * We rely on trylock_page() to avoid deadlock between
> 		 * concurrent migrations where each is waiting on the others
> 		 * page lock. If we can't immediately lock the page we fail this
> 		 * migration as it is only best effort anyway.
> 		 *
> 		 * If we can lock the page it's safe to set up a migration entry
> 		 * now. In the common case where the page is mapped once in a
> 		 * single process setting up the migration entry now is an
> 		 * optimisation to avoid walking the rmap later with
> 		 * try_to_migrate().
> 		 */

Good to me, thanks.

-- 
Peter Xu



      reply	other threads:[~2022-08-29 15:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  1:49 Alistair Popple
2022-08-25 23:51 ` Peter Xu
2022-08-26  0:34   ` Alistair Popple
2022-08-26 15:03     ` Peter Xu
2022-08-26 17:17       ` David Hildenbrand
2022-08-26 21:48         ` Peter Xu
2022-08-29  7:09           ` Alistair Popple
2022-08-29 15:30             ` Peter Xu [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=YwzbmwvvgDxHlRau@xz-m1.local \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=david@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redat.com \
    --cc=rcampbell@nvidia.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