page_ext_from_phys(9)
π¦ page_ext_from_phys(9) β a Kernel API Manual moment β¨
okay bestie, buckle up, this is a page from the Kernel API Manual and it's lowkey iconic π
β¨ NAME β¨
page_ext_from_phys β get the page_ext structure for a physical address, no cap π
πΈ SYNOPSIS πΈ
struct page_ext * page_ext_from_phys (phys_addr_t phys );
π«Ά ARGUMENTS π«Ά
physβ the physical address you wanna query, bestie. that's the whole assignment π
π₯ DESCRIPTION π₯
so this function safely gets the struct page_ext that's associated with a given physical address. the way it does it is honestly so responsible of it β it performs validation to make sure the address actually corresponds to a valid, online struct page before it even thinks about accessing it π like, it does a whole vibe check first, which is main character energy fr fr.
and if the vibe check fails? it returns NULL for MMIO, ZONE_DEVICE, holes and offline memory. periodt. π―
β RETURN β
NULL if no page_ext exists for this physical address. that's it, that's the tea π
π CONTEXT π
any context works here, bestie β it's giving flexible β¨
β οΈ but listen: the caller may not sleep until they have called page_ext_put. do not nap on the job, i'm so serious π
π SEE ALSO π
kernel file ./mm/page_ext.c and its besties page_ext_lookup(9), page_ext_get(9), page_ext_put(9) β go read them, iykyk π
mwah π that's a wrap! this lil page lives in the ./mm source and it's dated October 2026 β go off, kernel docs, you ate πππ§
π¦ 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