From: Alistair Popple <apopple@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
David Hildenbrand <david@redhat.com>,
akpm@linux-foundation.org, minchan@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
paulmck@kernel.org, jhubbard@nvidia.com, joaodias@google.com
Subject: Re: [PATCH] mm: Re-allow pinning of zero pfns
Date: Fri, 24 Jun 2022 11:55:25 +1000 [thread overview]
Message-ID: <874k0ax1s0.fsf@nvdebian.thelocal> (raw)
In-Reply-To: <20220624013415.GI4147@nvidia.com>
Jason Gunthorpe <jgg@nvidia.com> writes:
> On Fri, Jun 24, 2022 at 10:11:01AM +1000, Alistair Popple wrote:
>
>> > Hum.. Alistair, maybe you should look at this as well, I'm struggling
>> > alot to understand how it is safe to drop the reference on the page
>> > but hold a pointer to it on the movable_page_list - sure it was
>> > isolated - but why does that mean it won't be concurrently unmapped
>> > and freed?
>>
>> folio_isolate_lru() takes a reference on the page so you're safe from it
>> being freed. If it gets unmapped it will be freed when the matching
>> putback_movable_pages() is called.
>
> Hm, I guess I didn't dig deep enough into that call chain..
>
>> > Anyhow, it looks like the problem is the tortured logic in this
>> > function, what do you think about this:
>>
>> At a glance it seems reasonable, although I fear it might conflict with
>> my changes for device coherent migration. Agree the whole
>> check_and_migrate_movable_pages() logic is pretty tortured though, and I
>> don't think I'm making it better so would be happy to try cleaning it up
>> futher once the device coherent changes are in.
>
> OK, can I leave this patch with you then? I have no way to test it..
Yep, no worries.
> Thanks,
> Jason
next prev parent reply other threads:[~2022-06-24 1:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 22:35 Alex Williamson
2022-06-11 0:21 ` Minchan Kim
2022-06-11 18:29 ` David Hildenbrand
2022-06-15 15:56 ` Jason Gunthorpe
2022-06-23 18:07 ` David Hildenbrand
2022-06-23 20:21 ` Alex Williamson
2022-06-23 20:47 ` Jason Gunthorpe
2022-06-24 0:11 ` Alistair Popple
2022-06-24 1:34 ` Jason Gunthorpe
2022-06-24 1:55 ` Alistair Popple [this message]
2022-07-28 8:45 ` Alistair Popple
2022-07-28 9:23 ` David Hildenbrand
2022-07-29 2:49 ` Alistair Popple
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=874k0ax1s0.fsf@nvdebian.thelocal \
--to=apopple@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alex.williamson@redhat.com \
--cc=david@redhat.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=joaodias@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=paulmck@kernel.org \
/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