collapse_max_ptes_shared(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ¦‹

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