__get_pfnblock_flags_mask(9)
π __get_pfnblock_flags_mask(9) β like, the Kernel API Manual edition π
okay so bestie, gather round, because we're diving into the Kernel API Manual and honestly? this one's a lil niche but it's giving "I know things" energy and I'm obsessed. no cap, this is the function that goes and fetches you a whole group of flags for one pageblock_nr_pages block of pages. yes, that's the whole personality. β¨
πΈ NAME πΈ
__get_pfnblock_flags_mask β literally returns the requested group of flags for a pageblock_nr_pages block of pages π¦
π SYNOPSIS π
unsigned long __get_pfnblock_flags_mask (const struct page *page ,
unsigned long pfn , unsigned long mask );
look at her. three args, one unsigned long return, main character energy only. π
β¨ ARGUMENTS β¨
pageβ the page that lives inside the block of interest π«Ά like, the block you're curious about? she's in it.pfnβ the target page frame number, aka the specific number you're pointing at βmaskβ the mask of bits that the caller is interested in π only the bits you care about, we love a filter.
π₯ RETURN π₯
pageblock_bits flags β that's what you get back, periodt. π
π§ SEE ALSO π§
Kernel file ./mm/page_alloc.c β and fr fr, the whole friend group:
get_pfnblock_bit(9)get_pfnblock_migratetype(9)__set_pfnblock_flags_mask(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)
ngl bestie, the whole squad is in ./mm and they're all worth a lil read. iykyk π
and that's the page!! sourced straight from ./mm, dated October 2026, and it's the Kernel API Manual through and through. mwah π go get those pageblock flags, queen ππ
π¦ 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