Re: [PATCH 10/32] mm/khugepaged: don't wait for userfaultfd
From: David Hildenbrand (Arm)
Date: Tue Dec 01 2026 - 04:51:42 EST
On 11/29/26 21:16, Jose A. Perez de Azpillaga wrote:
> On 11/29/26 11:06 AM, David Hildenbrand (Arm) wrote:
>> khugepaged and MADV_COLLAPSE can end up triggering userfaultfd faults if
>> MADV_DONTNEED + UFFDIO_WRITEPROTECT races with collapse. The fault flags
>> are FAULT_FLAG_ALLOW_RETRY alone, so handle_userfault() sleeps in
>> TASK_UNINTERRUPTIBLE.
>>
>
> maybe is worth mentioning that the hang also needs the range registered
> with MISSING, IMHO.
Yeah, that's a good point.
We can only trigger a read-fault, so UFFDIO_WRITEPROTECT alone is not sufficient.
I'll add that detail, thanks!
--
Cheers,
David