set_pfnblock_bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… set_pfnblock_bit β€” like, the whole vibe

okay so real quick, bestie: this page lives in the Kernel API Manual (that's the manual name, not me being dramatic), and it's about one (1) tiny function. A single bit. That's it. That's the whole gig. And honestly? Iconic.


✨ NAME ✨

set_pfnblock_bit β€” sets a standalone bit of a pageblock πŸŽ€

like, one bit. just the one. not a whole mask, not a whole type, a standalone bit. she's lowkey doing the bare minimum and we respect her for it.


🌸 SYNOPSIS 🌸

void set_pfnblock_bit (const struct page *page , unsigned long pfn ,
       enum pageblock_bits pb_bit );

returns nothing (void), takes three things, no cap. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • page β€” the page that's chilling inside the block of interest πŸ’– like, the block you care about. this is your anchor point.
  • pfn β€” the target page frame number. this is the frame whose bit is getting set. 🎯
  • pb_bit β€” which pageblock bit to set, as an enum pageblock_bits. pick your fav. πŸ’…
ngl there's no exit status, no return value, no environment variables, no flags, no files touched β€” it's a void function and it's at peace with that. the drama is elsewhere. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

fr fr go read these next, they're all in the kernel file ./mm/page_alloc.c and they all have (9) energy:

that's the whole bestie roster, all 26 of them, no skipping, we don't do that here 🧚


also get_pfnblock_bit(9) and clear_pfnblock_bit(9) are literally right there if you want the read-and-clear versions. trio goals. 🌈

alright that's the page!! this little gem ships out of ./mm and it's dated October 2026 β€” so yeah, mark your calendar, she's from the future. drink water, go touch some pages, mwah πŸ’œβœ¨

πŸ“¦ where this page comes from