pmd_to_softleaf_folio(9)
π pmd_to_softleaf_folio(9) β like, the PMD-entry-to-folio converter, bestie β¨
okay so real talk, this is a page from the Kernel API Manual (section 9, kernel girlies rise π«Ά) and it's about one very specific little function. don't worry, it's short. we can do this. πΈ
β¨ NAME β¨
pmd_to_softleaf_folio β literally converts the PMD entry to a folio. that's the whole vibe. π¦
π SYNOPSIS π
struct folio * pmd_to_softleaf_folio (pmd_t pmd );
π ARGUMENTS π
pmdβ a PMD entry. that's it, that's the argument. hand it over. π
π₯ DESCRIPTION π₯
so here's the thing β the PMD entry you're passing in is expected to be a valid PMD softleaf entry. like, that's the assumption going in, no cap. if you're rolling up with something that isn't one, that's on you bestie π
β RETURN β
if it's a valid softleaf entry, you get back the folio that the softleaf entry references. slay. π
otherwise? NULL. π« that's the whole deal.
π SEE ALSO π
first up, the kernel file itself lives at ./include/linux/leafops.h β go read it, iykyk π
and then the whole friend group, in order, no skips:
softleaf_mk_none(9)softleaf_from_pte(9)softleaf_to_pte(9)softleaf_from_pmd(9)softleaf_to_pmd(9)softleaf_is_none(9)softleaf_type(9)softleaf_is_swap(9)softleaf_is_migration_write(9)softleaf_is_migration_read(9)softleaf_is_migration_read_exclusive(9)softleaf_is_migration(9)softleaf_is_device_private_write(9)softleaf_is_device_private(9)softleaf_is_device_exclusive(9)softleaf_is_hwpoison(9)softleaf_is_marker(9)softleaf_to_marker(9)softleaf_has_pfn(9)softleaf_to_pfn(9)softleaf_to_page(9)softleaf_to_folio(9)softleaf_is_poison_marker(9)softleaf_is_guard_marker(9)softleaf_is_uffd_wp_marker(9)softleaf_is_migration_young(9)softleaf_is_migration_dirty(9)pte_is_marker(9)pte_is_uffd_wp_marker(9)pte_is_uffd_marker(9)pmd_is_device_private_entry(9)pmd_is_migration_entry(9)softleaf_is_valid_pmd_entry(9)pmd_is_valid_softleaf(9)
like, that's the entire group chat and every single one of them is invited π β¨
and that's the page!! mwah π this one's from ./include/linux, dated October 2026 β catch you in the next man page, bestie π§ββοΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms