Thread (22 messages) flat view 22 messages, 3 authors, 2021-02-03

Re: [PATCH v8 02/14] mm/gup: check every subpage of a compound page during isolation

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2021-02-03 18:02:22
Also in: linux-kselftest, linux-mm, lkml

On Wed, Feb 03, 2021 at 04:13:21PM +0000, Joao Martins wrote:
If check_and_migrate_movable_pages() is meant to migrate unpinned
pages, then rather than pinning+unpinning+moving, perhaps it would
be called in __get_user_pages() place where we are walking page
tables and know if it's a PUD/PMD and can skip all the subpages and
just record and migrate those instead. Was that your thinking?
I think a reasonable approach is to detect non-pinnable pages while
walking the VMAs, when found isolate them and thread them on a linked
list.

When the VMA walk is done you'll have a linked list of isolated pages
that need migration. So the check_and_migrate_movable_pages() gets
split into the top half being diffused in the VMA walk and the bottom
half still called after __get_user_pages() returns.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help