From: Qi Zheng <zhengqi.arch@bytedance.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>, Barry Song <21cnbao@gmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Barry Song <v-songbaohua@oppo.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
David Hildenbrand <david@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>,
Suren Baghdasaryan <surenb@google.com>,
Lokesh Gidra <lokeshgidra@google.com>,
Tangquan Zheng <zhengtangquan@oppo.com>
Subject: Re: [PATCH RFC v2] mm: use per_vma lock for MADV_DONTNEED
Date: Mon, 9 Jun 2025 14:40:09 +0800 [thread overview]
Message-ID: <5fac6f20-2643-4d98-a29a-06471f156762@bytedance.com> (raw)
In-Reply-To: <d68ba9d4-5850-4b70-bbf3-00d79f19fd3f@lucifer.local>
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!
>
>>
next prev parent reply other threads:[~2025-06-09 6:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 10:44 [PATCH RFC v2] mm: use per_vma lock for MADV_DONTNEED Barry Song
2025-05-30 14:06 ` Jann Horn
2025-05-30 14:34 ` Lorenzo Stoakes
2025-05-30 20:17 ` Barry Song
2025-06-02 17:35 ` SeongJae Park
2025-06-02 17:53 ` SeongJae Park
2025-05-30 20:40 ` Jann Horn
2025-06-02 11:50 ` Lorenzo Stoakes
2025-06-03 1:06 ` Barry Song
2025-06-03 9:48 ` Lorenzo Stoakes
2025-06-03 7:06 ` Barry Song
2025-06-03 16:52 ` Jann Horn
2025-06-05 10:27 ` Barry Song
2025-05-30 22:00 ` Barry Song
2025-06-02 14:55 ` Jann Horn
2025-06-03 7:51 ` Barry Song
2025-06-03 7:24 ` Qi Zheng
2025-06-03 9:54 ` Lorenzo Stoakes
2025-06-04 6:02 ` Qi Zheng
2025-06-04 17:50 ` Lorenzo Stoakes
2025-06-05 3:23 ` Qi Zheng
2025-06-05 14:04 ` Lorenzo Stoakes
2025-06-06 3:55 ` Qi Zheng
2025-06-06 10:44 ` Lorenzo Stoakes
2025-06-09 6:40 ` Qi Zheng [this message]
2025-06-09 15:08 ` Lorenzo Stoakes
2025-06-10 7:20 ` David Hildenbrand
2025-06-06 11:07 ` Jann Horn
2025-06-03 18:43 ` Lorenzo Stoakes
2025-06-03 20:17 ` Suren Baghdasaryan
2025-06-04 5:22 ` Lorenzo Stoakes
2025-06-06 7:18 ` Barry Song
2025-06-06 10:16 ` Lorenzo Stoakes
2025-06-03 20:59 ` Pedro Falcato
2025-06-04 5:23 ` Lorenzo Stoakes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fac6f20-2643-4d98-a29a-06471f156762@bytedance.com \
--to=zhengqi.arch@bytedance.com \
--cc=21cnbao@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lokeshgidra@google.com \
--cc=lorenzo.stoakes@oracle.com \
--cc=surenb@google.com \
--cc=v-songbaohua@oppo.com \
--cc=vbabka@suse.cz \
--cc=zhengtangquan@oppo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).