From: Lance Yang <lance.yang@linux.dev>
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: akpm@linux-foundation.org, david@kernel.org, liam@infradead.org,
vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, riel@surriel.com, harry@kernel.org,
jannh@google.com, pfalcato@suse.de, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, pan.deng@intel.com
Subject: Re: [PATCH v2] mm/vma: don't remove VMA from rmap if pgoff unchanged
Date: Fri, 2 Oct 2026 22:15:36 +0800 [thread overview]
Message-ID: <28f2c85c-d45c-46af-bd2f-e97696f42f7c@linux.dev> (raw)
In-Reply-To: <ar-53boTrPQijDUt@gremlin>
On 2026/10/2 22:05, Lorenzo Stoakes (ARM) wrote:
> On Thu, Oct 01, 2026 at 11:45:11PM +0800, Lance Yang wrote:
[...]
>>> +static void anon_rmap_tree_update_inplace(struct anon_vma_chain *avc)
>>> +{
>>> +#ifdef CONFIG_DEBUG_VM_RB
>>> + avc->cached_vma_last = avc_last_pgoff(avc);
>>> +#endif
>>> + /* Propagate all the way up the tree. */
>>
>> Nit: propagate() can stop early when rb_subtree_last is unchanged ...
>>
>> Maybe:
>>
>> /* Update the subtree maximum and propagate any changes up the tree. */
>
> I think in this case it's ok to be a bit blurry about it :P it deciding not to
> unnecessary work is fine but I don't want to put too much in there.
>
> The point is as a simple sign or pointer to help somebody wondering wtf that's
> for even if it's not quite the full story!
>
> Hopefully that's ok? :)
Fair enough. Let’s leave it as-is ;)
>
>>
>>> + __anon_rmap_tree_augment.propagate(&avc->rb, NULL);
>>> +}
>>> +
>> [...]
>>
>> Acked-by: Lance Yang <lance.yang@linux.dev>
>
> Thanks :)
>
>>
>> Hammered it with VMA churn (split/merge/mremap/madvise/fork) + concurrent
>> rmap walks + hwpoison injection. Nothing complained :D
>>
>> Tested-by: Lance Yang <lance.yang@linux.dev>
>
> Thanks, very much appreciated! :)
Cheers!
next prev parent reply other threads:[~2026-10-02 14:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 17:53 Lorenzo Stoakes (ARM)
2026-10-01 15:45 ` Lance Yang
2026-10-02 14:05 ` Lorenzo Stoakes (ARM)
2026-10-02 14:15 ` Lance Yang [this message]
2026-10-02 14:24 ` Pedro Falcato
2026-10-02 14:27 ` Lorenzo Stoakes (ARM)
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=28f2c85c-d45c-46af-bd2f-e97696f42f7c@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=harry@kernel.org \
--cc=jannh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=pan.deng@intel.com \
--cc=pfalcato@suse.de \
--cc=riel@surriel.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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
all inboxes | Powered by JetHome®