Re: [RFC PATCH v2 01/18] mm: free PG_rcu_free folios only after an RCU grace period
From: David Hildenbrand (Arm)
Date: Fri Nov 20 2026 - 04:29:29 EST
On 11/13/26 15:17, Kiryl Shutsemau wrote:
> On Thu, Nov 12, 2026 at 01:32:02PM +0100, David Hildenbrand (Arm) wrote:
>> On 11/12/26 13:26, Kiryl Shutsemau wrote:
>>>
>>> Right: once the folio is allocated separately, the lockless read
>>> dereferences it too, so it has to wait for the grace period along with
>>> its pages. The per-CPU batching and the waits in the allocator later
>>> in the series do not depend on where the check sits.
>>>
>>> Until then the folio is the struct page, and __free_pages_prepare() is
>>> the one place every page cache folio passes, so v3 keeps the check
>>> there.
>>
>> If we go that way, don't make it effectively folio-centric in the
>> implementation. That's what triggered my response in the first place.
>
> Is something like this what you mean?
I guess, so and not making this a pure folio flag.
... but I am not able to think clearly anymore, too many fixes :D
--
Cheers,
David