Re: [RFC PATCH 0/2] mm/migrate: wait for folio refcount during longterm pin migration
From: John Hubbard
Date: Wed Apr 22 2026 - 22:53:03 EST
On 4/21/26 6:46 PM, Huang, Ying wrote:
> "David Hildenbrand (Arm)" <david@xxxxxxxxxx> writes:
>> On 4/21/26 11:19, Huang, Ying wrote:
>>> Hi, John,
>>>
>>> John Hubbard <jhubbard@xxxxxxxxxx> writes:
>>>
>>>> Hi,
>>>>
>>>> This adds a bounded sleep to migration so that FOLL_LONGTERM pinning can
>>>> wait for transient folio references to drain, instead of failing after a
>>>> fixed number of retries. The wait uses a one-second timeout. An
>>>
>>> Is the one-second timeout appropriate for all users? Do some users
>>> prefer fail-fast behavior instead? If so, should we add another FOLL
>>> flag to support a timed wait?
>>
>> We should avoid a FOLL flag to affect that behavior. FOLL_LONGTERM
>> already implies that things could take a while.
>
> Yes. I am just not sure whether one-second is OK for all users.
>
>> So we have real examples were failing is even desirable? :)
>
> Hi, John,
>
> Could you do some research on this?
>
Yes, absolutely! Great set of questions from everyone, much appreciated.
I'm hoping to have some answers to post before LSF/MM, these are not
too hard to answer.
thanks,
--
John Hubbard