set_pfnblock_bit(9)
π 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 anenum 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:
__get_pfnblock_flags_mask(9)get_pfnblock_bit(9)get_pfnblock_migratetype(9)__set_pfnblock_flags_mask(9)clear_pfnblock_bit(9)set_pageblock_migratetype(9)__move_freepages_block_isolate(9)__putback_isolated_page(9)__free_pages(9)free_pages(9)alloc_pages_exact(9)alloc_pages_exact_nid(9)free_pages_exact(9)nr_free_zone_pages(9)nr_free_buffer_pages(9)find_next_best_node(9)free_reserved_pages(9)setup_per_zone_wmarks(9)__free_contig_range(9)alloc_contig_frozen_range(9)alloc_contig_range(9)alloc_contig_frozen_pages(9)alloc_contig_pages(9)free_contig_frozen_range(9)free_contig_range(9)alloc_pages_nolock(9)
that's the whole bestie roster, all 26 of them, no skipping, we don't do that here π§
alsoget_pfnblock_bit(9)andclear_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
- 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