__set_pfnblock_flags_mask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __set_pfnblock_flags_mask β€” Kernel API Manual energy, bestie

okay so like. welcome to the Kernel API Manual, bestie πŸŽ€ and today's main character is __set_pfnblock_flags_mask β€” say that five times fast, i dare you 😭 this one is literally the "set the flags" girlie for a whole block of pages, no cap.


✨ NAME ✨

__set_pfnblock_flags_mask β€” set the requested group of flags for a pageblock_nr_pages block of pages πŸ¦‹

like. it's giving "i flip the bits you asked for, on an entire pageblock, and nothing else." periodt.


🌸 SYNOPSIS 🌸

void __set_pfnblock_flags_mask (struct page *page , unsigned long pfn ,
       unsigned long flags , unsigned long mask );

returns nothing, void, zero notes, she just does the thing and leaves πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • page β€” the page within the block of interest πŸ‘‘ like it's your entry point into the block, the vibe check that tells you which block we're even talking about.
  • pfn β€” the target page frame number πŸ”₯ the actual number-number of the page we're pointing at.
  • flags β€” the flags to set ✨ the bits you want turned on, bestie.
  • mask β€” mask of bits that the caller is interested in 🌈 so you're saying "only this group of bits matters to me," and the rest of the world can stay unbothered.
fr fr: flags is what you wanna set, mask is which bits you're allowed to touch. keep those two straight and you're golden πŸ’œ

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group came out for this one, i'm obsessed 😭 all of these are from the kernel file ./mm/page_alloc.c:


and that's the whole page, bestie 🫢 go set some flags, stay iconic, drink water πŸ’§

this lil masterpiece lives in ./mm, dated October 2026, and it's filed under __set_pfnblock_flags_mask(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from