All of lore.kernel.org
 help / color / mirror / Atom feed
* what is the correct hugepage dependency for large pagecache folios
@ 2026-11-25  8:43 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2026-11-25  8:43 UTC (permalink / raw)
  To: willy, jack; +Cc: linux-fsdevel, linux-mm

Hi all,

we ran into an interesting cluster of issues with an LLM review for
the (not upstream submitted yet but public) xraid code.

The LLM complained that largest_zero_folio might only return a
PAGE_SIZE zero folio, and this can happen because either:

 - CONFIG_TRANSPARENT_HUGEPAGE is enabled by has_transparent_hugepage
   returns false
 - huge_zero_init can fail to allocate a PMD-sized huge folio even
   when transparent huge pages are supported and
   CONFIG_PERSISTENT_HUGE_ZERO_FOLIO is selected

This boils down to three interesting questions:

 1) should mapping_max_folio_size_supported check has_transparent_hugepage
    instead of CONFIG_TRANSPARENT_HUGEPAGE, or do all the required bits
    for large folios in the page work fine even if there is no hardware
    support for PMD-level or other mappings?
 2) should huge_zero_init aim to allocate a large zero folio even
    when has_transparent_hugepage returns true so that file systems
    can assume to have a file system-block sized zero folio?
 3) should we fail to boot if the allocation in huge_zero_init
    fails?

Note that only 1) really applies to the current upstream kernel as both
current users of largest_zero_folio can fall back to building bios
with multiple segments of zero_page, but for some of my pending code
that won't be as easy, so if we can't actually reliably get a common
zero folio of mapping_max_folio_size_supported we might have to allocate
a duplicate one in fs code.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  8:43 what is the correct hugepage dependency for large pagecache folios Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.