On 02.05.24 03:05, Alistair Popple wrote:..
Jason Gunthorpe <jgg@xxxxxxxxxx> writes:
This doesn't make sense. IFF a blind retry is all that is needed it
should be done in the core functionality. I fear it's not that easy,
though.
+1
This migration retry weirdness is a GUP issue, it needs to be solved
in the mm not exposed to every pin_user_pages caller.
If it turns out ZONE_MOVEABLE pages can't actually be reliably moved
then it is pretty broken..
I wonder if we should remove the arbitrary retry limit in
migrate_pages() entirely for ZONE_MOVEABLE pages and just loop until
they migrate? By definition there should only be transient references on
these pages so why do we need to limit the number of retries in the
first place?
There are some weird things that still needs fixing: vmsplice() is the example that doesn't use FOLL_LONGTERM.