[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3db65a9c-4ee4-4bba-ba8b-f1171f942766@redhat.com>
Date: Mon, 14 Jul 2025 14:41:12 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, nvdimm@...ts.linux.dev,
Andrew Morton <akpm@...ux-foundation.org>, Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Dan Williams <dan.j.williams@...el.com>, Alistair Popple
<apopple@...dia.com>, Matthew Wilcox <willy@...radead.org>,
Jan Kara <jack@...e.cz>, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Zi Yan <ziy@...dia.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>, Jann Horn <jannh@...gle.com>,
Pedro Falcato <pfalcato@...e.de>
Subject: Re: [PATCH RFC 08/14] mm/huge_memory: mark PMD mappings of the huge
zero folio special
On 25.06.25 10:32, Oscar Salvador wrote:
> On Tue, Jun 17, 2025 at 05:43:39PM +0200, David Hildenbrand wrote:
>> The huge zero folio is refcounted (+mapcounted -- is that a word?)
>> differently than "normal" folios, similarly (but different) to the ordinary
>> shared zeropage.
>>
>> For this reason, we special-case these pages in
>> vm_normal_page*/vm_normal_folio*, and only allow selected callers to
>> still use them (e.g., GUP can still take a reference on them).
>>
>> vm_normal_page_pmd() already filters out the huge zero folio. However,
>> so far we are not marking it as special like we do with the ordinary
>> shared zeropage. Let's mark it as special, so we can further refactor
>> vm_normal_page_pmd() and vm_normal_page().
>>
>> While at it, update the doc regarding the shared zero folios.
>>
>> Signed-off-by: David Hildenbrand <david@...hat.com>
>
> Reviewed-by: Oscar Salvador <osalvador@...e.de>
>
> While doing this, would it make sense to update vm_normal_page_pmd()
> comments to refelect that pmd_special will also catch huge_zero_folio()?
> It only mentions huge pfnmaps.
>
> It might not be worth doing since you remove that code later on, but
> maybe if someone stares at this commit alone..
Yes, it should be removed in this patch, thanks!
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists