get_pfnblock_bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 get_pfnblock_bit(9) β€” kernel API manual, but make it make sense 🌸

okay bestie, so this one is from the kernel API manual (get_pfnblock_bit(9), section 9, we stan a numbered manual section) and it's genuinely one of the smaller little guys in ./mm, so let's get into it πŸ’…


✨ NAME ✨

get_pfnblock_bit β€” the "is this one single standalone bit of a pageblock actually set?" check πŸ”

πŸ¦‹ SYNOPSIS πŸ¦‹

bool get_pfnblock_bit (const struct page *page , unsigned long pfn ,
enum pageblock_bits pb_bit );

like, yes, that's the whole signature, keep it exactly as-is, no notes 🫢

πŸŽ€ ARGUMENTS πŸŽ€

  • page β€” const struct page * β€” the page that lives inside the block you care about, iykyk 🏠
  • pfn β€” unsigned long β€” the target page frame number, aka the exact frame you're pointing at 🎯
  • pb_bit β€” enum pageblock_bits β€” which pageblock bit you wanna check πŸ‘€

⭐ RETURN ⭐

  • true if the bit is set πŸ’–
  • otherwise false πŸ’€

that's it. that's the whole return contract. no cap.

🌈 SEE ALSO 🌈

so this function does NOT live alone, it has a whole friend group, and the kernel file it hangs out in is ./mm/page_alloc.c β€” here's everyone πŸ‘‘

bestie reminder: every one of those is literally spelled the same in the real page, so don't go "fixing" the underscores, the double underscores mean something πŸ™ˆ

and that's the whole vibe check πŸ’œ this page came from ./mm and it's dated October 2026, so go off, read the source, slay, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from