From: John Hubbard <jhubbard@nvidia.com>
To: David Hildenbrand <david@redhat.com>,
Will Deacon <will@kernel.org>, Hugh Dickins <hughd@google.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Keir Fraser <keirf@google.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Frederick Mayle <fmayle@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Xu <peterx@redhat.com>, Rik van Riel <riel@surriel.com>,
Vlastimil Babka <vbabka@suse.cz>, Ge Yang <yangge1116@126.com>
Subject: Re: [PATCH] mm/gup: Drain batched mlock folio processing before attempting migration
Date: Tue, 9 Sep 2025 17:24:02 -0700 [thread overview]
Message-ID: <6a93bf8f-b46f-4c68-a03d-f3a8b2a1589d@nvidia.com> (raw)
In-Reply-To: <655d2d29-8fe6-4684-aba4-4803bed0d4d0@redhat.com>
On 9/9/25 4:50 AM, David Hildenbrand wrote:
> On 09.09.25 13:39, Will Deacon wrote:
>> On Fri, Aug 29, 2025 at 08:46:52AM -0700, Hugh Dickins wrote:
>>> On Fri, 29 Aug 2025, Will Deacon wrote:
>>>> On Thu, Aug 28, 2025 at 01:47:14AM -0700, Hugh Dickins wrote:
...
> Migration code itself will retry multiple times, which usually takes
> care of most races.
>
> Not all of course.
>
> Now, I recall John was working on that at some point (I recall an RFC
> patch, but I might be daydreaming), and I recall discussions at LSF/MM
Yes. I was trying to improve the gup scenario of "try to long-term pin
pages that are currently in ZONE_MOVABLE, and must therefore be migrated
before pinning them". The problem is that the current code just retries
in a loop, when what we really want is for it to go to sleep and wait
for the pages to become migratable.
Anyway, I had trouble finding something to wait *on*. David here at
the last LSF/MM suggested waiting on a page group, but I only partially
understand the approach--and what really happened is that I am
"temporarily" (for a few years) consumed by this entertaining new
Nova (Rust for Linux) project.
And so I've failed to make any progress there this year.
> around improving handling when we are mixing a flood of short-therm gup
> with a single long-term gup that wants to migrate these (short-term
> pinned) pages.
>
> Essentially, we would have to temporarily prevent new short-term GUP
> pins in order to make the long-term GUP-pin succeed in migrating the folio.
>
thanks,
--
John Hubbard
prev parent reply other threads:[~2025-09-10 0:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 10:18 Will Deacon
2025-08-16 1:03 ` John Hubbard
2025-08-16 4:33 ` Hugh Dickins
2025-08-18 13:38 ` Will Deacon
2025-08-16 4:14 ` Hugh Dickins
2025-08-16 8:15 ` David Hildenbrand
2025-08-18 13:31 ` Will Deacon
2025-08-18 14:31 ` Will Deacon
2025-08-25 1:25 ` Hugh Dickins
2025-08-25 16:04 ` David Hildenbrand
2025-08-28 8:47 ` Hugh Dickins
2025-08-28 8:59 ` David Hildenbrand
2025-08-28 16:12 ` Hugh Dickins
2025-08-28 20:38 ` David Hildenbrand
2025-08-29 1:58 ` Hugh Dickins
2025-08-29 8:56 ` David Hildenbrand
2025-08-29 11:57 ` Will Deacon
2025-08-29 13:21 ` Will Deacon
2025-08-29 16:04 ` Hugh Dickins
2025-08-29 15:46 ` Hugh Dickins
2025-09-09 11:39 ` Will Deacon
2025-09-09 11:50 ` David Hildenbrand
2025-09-10 0:24 ` John Hubbard [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=6a93bf8f-b46f-4c68-a03d-f3a8b2a1589d@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=fmayle@google.com \
--cc=hughd@google.com \
--cc=jgg@ziepe.ca \
--cc=keirf@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=riel@surriel.com \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=yangge1116@126.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