Re: [PATCHv7 13/18] mm: Drop fake head checks
From: David Hildenbrand (Arm)
Date: Tue Oct 27 2026 - 09:20:23 EST
On 10/27/26 13:47, Peter Zijlstra wrote:
> On Tue, Oct 27, 2026 at 12:31:09PM +0000, Kiryl Shutsemau wrote:
>> On Tue, Oct 27, 2026 at 01:05:58PM +0100, David Hildenbrand (Arm) wrote:
>>>
>>> Right. Without HVO we would just corrupt pages in the single folio (which is
>>> also not nice).
>>>
>>> I'm also questioning whether we need this RO protection all the time active.
>>
>> What do you have in mind? RO only under a debug option, or switching the
>> tail page to RO some time after the remap?
>>
>> If it is the delay, a grace period alone does not close the race. We
>> would need rcu_read_lock() back around the get, and then it is the old
>> scheme with the wait taken off the allocation path.
>
> So it used to be; back when Nick introduced try_get_page, that it was
> only allowed with IRQs disabled.
>
> And looking at gup.c now, I see gup_fast_pgd_range() still has
> local_irq_save/restore around it.
>
> So what do you need that rcu crud for?
Pagecache lookup (and other speculative page table walkers) call it as well.
Some with IRQ disabled, some with RCU, others with no protection.
--
Cheers,
David