collapse_max_ptes_shared(9)
π collapse_max_ptes_shared(9)
okay so this is a page straight out of the Kernel API Manual, and yes it's a (9) section situation, we love that for us π
β¨ NAME β¨
collapse_max_ptes_shared β bestie, this one does math for you: it calculates the maximum allowed PTEs that map shared anonymous pages for whatever collapse operation you're doing π§
πΈ SYNOPSIS πΈ
unsigned int collapse_max_ptes_shared (struct collapse_control *cc ,
unsigned int order );
that's the whole vibe, no cap π«Ά
π ARGUMENTS π
ccβ the collapse control struct, aka the main character carrying all the context πorderβ the folio order you're collapsing to, like the destination of the whole glow-up β¨
π₯ RETURN π₯
it hands you back the maximum number of PTEs that map shared anonymous pages for the collapse operation. that's the answer, that's the tea, periodt π
π¦ SEE ALSO π¦
- Kernel file
./mm/khugepaged.c struct khugepaged_scan(9)collapse_max_ptes_none(9)collapse_max_ptes_swap(9)collapse_pte_mapped_thp(9)collapse_file(9)
like, go read the whole friend group, they're all iconic ππ
and that's the page!! sign-off time: this lil masterpiece lives in ./mm and it's dated October 2026 β so go forth, collapse those PTEs responsibly, ily bye ππβ
π¦ 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