[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5fac6f20-2643-4d98-a29a-06471f156762@bytedance.com>
Date: Mon, 9 Jun 2025 14:40:09 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Jann Horn <jannh@...gle.com>, Barry Song <21cnbao@...il.com>,
akpm@...ux-foundation.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Barry Song <v-songbaohua@...o.com>, "Liam R. Howlett"
<Liam.Howlett@...cle.com>, David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>, Suren Baghdasaryan <surenb@...gle.com>,
Lokesh Gidra <lokeshgidra@...gle.com>,
Tangquan Zheng <zhengtangquan@...o.com>
Subject: Re: [PATCH RFC v2] mm: use per_vma lock for MADV_DONTNEED
Hi Lorenzo,
On 6/6/25 6:44 PM, Lorenzo Stoakes wrote:
[snip]
>>
>>>
>>> We could in theory always add another callback .pmd_entry_sleep or
>>> something for this one case and document the requirement...
>>
>> Maybe, but the SRCU critical section cannot prevent the PTE page from
>> being freed via RCU. :(
>
> Idea is we'd fall back to non-RCU in this case and take locks... but then
> ugh we'd race everything RCU and no it's all or nothing isn't it?
So maybe the RCU+refcount method is feasible. We can release the RCU
lock after incrementing the reference count, which can ensure that the
page table page is not freed.
>
> Overall - I will stash this response somewhere and come back to it if
> somebody else doesn't in the meantime :)
Thanks!
>
>>
Powered by blists - more mailing lists