__set_pfnblock_flags_mask(9)
π
__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:flagsis what you wanna set,maskis 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:
__get_pfnblock_flags_mask(9)get_pfnblock_bit(9)get_pfnblock_migratetype(9)set_pfnblock_bit(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)
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
- 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