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 <da...@redhat.com>
Reviewed-by: Oscar Salvador <osalva...@suse.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.. -- Oscar Salvador SUSE Labs