[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45e08ee0-c85e-469e-a3eb-4ca2e8b7ec0c@arm.com>
Date: Thu, 25 Sep 2025 16:03:10 +0530
From: Dev Jain <dev.jain@....com>
To: David Hildenbrand <david@...hat.com>, akpm@...ux-foundation.org
Cc: lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Lokesh Gidra <lokeshgidra@...gle.com>
Subject: Re: [PATCH] mm: move rmap of mTHP upon CoW reuse
On 25/09/25 2:46 pm, David Hildenbrand wrote:
> On 25.09.25 10:54, Dev Jain wrote:
>> At wp-fault time, when we find that a folio is exclusively mapped, we
>> move
>> folio->mapping to the faulting VMA's anon_vma, so that rmap overhead
>> reduces. This is currently done for small folios (base pages) and
>> PMD-mapped THPs. Do this for mTHP too.
>
> I deliberately didn't add this back then because I was not able to
> convince myself easily that it is ok in all corner cases. So this
> needs some thought.
Thanks for your detailed reply.
>
>
> We know that the folio is exclusively mapped to a single MM and that
> there are no unexpected references from others (GUP pins, whatsoever).
>
> But a large folio might be
>
> (a) mapped into multiple VMAs (e.g., partial mprotect()) in the same MM
I think we have the same problem then for PMD-THPs? I see that
vma_adjust_trans_huge() only does a PMD split and not folio split.
> [--- snip ---]
>
Powered by blists - more mailing lists