PMAP_PAGE_EXISTS_QUICK(9)
π PMAP_PAGE_EXISTS_QUICK
okay so bestie, welcome to PMAP_PAGE_EXISTS_QUICK(9) β that's the Kernel Developer's Manual page, section 9, and it's about exactly one tiny little function that does one tiny little job, and honestly? it eats. β¨
πΈ NAME πΈ
pmap_page_exists_quick β determine if a page exists in a physical map
like, is this page in this pmap or not, and can we find out fast πββοΈπ¨
π SYNOPSIS π
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
bool
pmap_page_exists_quick(pmap_t pmap, vm_page_t m);
yes you need all three includes, no you cannot skip one, i don't make the rules (the kernel makes the rules) π«Ά
π¦ DESCRIPTION π¦
so the pmap_page_exists_quick() function is used to quickly determine if the page m exists in the physical map pmap. it's typically called from the VM paging code. that's it. that's the whole vibe check. π
speed is the whole point here β the "quick" is literally in the name, it's giving main character energy π₯
π IMPLEMENTATION NOTES π
the PV count used above may be changed upwards or downwards in future; it is only necessary that true be returned for a small subset of pmaps for proper page aging.
ngl this is the important bit so pay attention π β that "above" is the 16 from RETURN VALUES down there, and it is not a promise. it can go up, it can go down, it can do whatever it wants in the future. the only thing that actually has to hold is that true comes back for a small subset of pmaps, because that's what proper page aging needs. so don't go building your whole life on the number 16, bestie, it's not that kind of number π
β RETURN VALUES β
pmap_page_exists_quick() returns true only if the PV entry for the physical map pmap is one of the first 16 PVs linked from the page m. π―
that's it. that's the whole return contract. true under those conditions, and that's the only way you get a true. periodt. π
π SEE ALSO π
go read that one next, iykyk π§
π AUTHORS π
this manual page was written by Bruce M Simpson <bms@spc.org>. thank you bruce, icon behavior π
and that's a wrap on PMAP_PAGE_EXISTS_QUICK(9)! this one came from the Debian crew, dated July 21, 2003 β a vintage page serving vintage looks, and it still slays π
β¨ππ¦πΈπ«Ά
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms