mapping_pmd_folio_support(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mapping_pmd_folio_support(9) ✨

okay so this is a page from the Kernel API Manual, and honestly it's a little one but it's doing an important job, so let's give it the attention it deserves 🫢


πŸ’– NAME πŸ’–

mapping_pmd_folio_support β€” check if a mapping supports PMD-sized folio


🌸 SYNOPSIS 🌸

bool mapping_pmd_folio_support (const struct address_space *mapping );

πŸŽ€ ARGUMENTS πŸŽ€

  • mapping β€” the address_space, bestie. that's the thing you're asking about πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: some mappings support large folios, right? but that does not automatically mean they support PMD-sized folios. nope. not the same thing, don't conflate them πŸ™ˆ

this function literally just checks whether a mapping supports PMD-sized folios. that's it. that's the whole vibe check ✨

for example, khugepaged needs this info before it even attempts to collapse THPs β€” so it's out here asking "hey, do you support PMD-sized folios or not" before doing anything, which is honestly so valid of it πŸ‘‘


πŸ’œ RETURN πŸ’œ

  • True if PMD-sized folios are supported πŸ”₯
  • otherwise false πŸ’€

🌈 SEE ALSO 🌈

all the related lore lives in ./include/linux/pagemap.h, and here's the whole squad:


ngl the ./include/linux directory is where all the magic happens, and this page is dated October 2026 β€” so like, futuristic behavior honestly πŸ’…βœ¨

k that's the whole page, ily, go read your pagemap header πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from