pcpu_is_populated(9)
π pcpu_is_populated β NAME
okay so bestie, welcome to the Kernel API Manual (yes, the whole entire vibe β¨) and today we're looking at pcpu_is_populated β which literally just determines if the region is populated. that's it. that's the function. no cap. π
π¦ SYNOPSIS
bool pcpu_is_populated (struct pcpu_chunk *chunk , int bit_off , int bits , int *next_off );
πΈ ARGUMENTS
chunkβ the chunk of interest, aka the main character of this whole operation πbit_offβ the chunk offset, like where you're starting your little search bestiebitsβ size of the area, so how much we're looking atnext_offβ the return value for the next offset to start searching, iykyk π
β DESCRIPTION
so for atomic allocations, this checks if the backing pages are populated. periodt. that's the whole description, no need to overthink it bestie π
π RETURN
it gives you a bool β if the backing pages are populated. also lowkey:
next_indexis to skip over unpopulated blocks inpcpu_find_block_fit.
(and yes the page really does say next_index there even though the argument is named next_off, we don't question the kernel gods, we just vibe π)
β¨ SEE ALSO
okay this list is iconic and long, buckle up besties, all from the kernel file ./mm/percpu.c:
pcpu_addr_in_chunk(9)pcpu_check_block_hint(9)pcpu_next_md_free_region(9)pcpu_next_fit_region(9)pcpu_mem_zalloc(9)pcpu_mem_free(9)pcpu_chunk_relocate(9)pcpu_block_update(9)pcpu_chunk_refresh_hint(9)pcpu_block_refresh_hint(9)pcpu_block_update_hint_alloc(9)pcpu_block_update_hint_free(9)pcpu_find_block_fit(9)pcpu_alloc_area(9)pcpu_free_area(9)pcpu_alloc_first_chunk(9)pcpu_chunk_populated(9)pcpu_chunk_depopulated(9)pcpu_chunk_addr_search(9)pcpu_alloc(9)pcpu_balance_free(9)pcpu_balance_populated(9)pcpu_reclaim_populated(9)pcpu_balance_workfn(9)free_percpu(9)is_kernel_percpu_address(9)per_cpu_ptr_to_phys(9)pcpu_alloc_alloc_info(9)pcpu_free_alloc_info(9)pcpu_dump_alloc_info(9)pcpu_setup_first_chunk(9)pcpu_build_alloc_info(9)pcpu_embed_first_chunk(9)pcpu_page_first_chunk(9)
and that's the whole page bestie! this gem lives in ./mm and the date stamped on it is October 2026 β so yeah, it's giving future vibes but we stan a timeless kernel API forever and always ππ«Άπ
π¦ 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