pcpu_balance_populated(9)
π pcpu_balance_populated β Kernel API Manual, bestie edition β¨
Okay so listen, this page is pcpu_balance_populated(9) from the Kernel API Manual and honestly she's a whole vibe. Let's get into it π
πΈ NAME πΈ
pcpu_balance_populated β manage the amount of populated pages, no cap
π¦ SYNOPSIS π¦
void pcpu_balance_populated (void );
That's it. That's the whole signature. Short and iconic, as she should be π
π ARGUMENTS π
voidβ no arguments, bestie. She takes nothing, she gives everything. Zero notes, main character energy fr fr π«Ά
β DESCRIPTION β
So the whole point of this function is to maintain a certain amount of populated pages so that atomic allocations can actually be satisfied. Like, she's out here keeping the vibes stocked so nobody's request gets left on read π
But here's the part where you gotta be careful, okay? It is possible that this is called when physical memory is scarce β and that will cause the OOM killer to be triggered π And ngl, we should avoid doing so until an actual allocation causes the failure, because it is possible that requests can be serviced from already backed regions. Basically: don't let the panic set in before it's actually the moment, iykyk π§
β οΈ Real talk: this can be called when physical memory is scarce, and that can trigger the OOM killer. Avoid that until an actual allocation causes the failure, since requests can be serviced from already backed regions. She's dramatic but the caveat is real π
π₯ CONTEXT π₯
pcpu_lockβ and yes she can be dropped temporarily, so don't be weird about it β¨
π SEE ALSO π
Kernel file ./mm/percpu.c, plus the whole squad, all of them, every single one π:
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_is_populated(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_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)
Like, the entire percpu friend group showed up to the function. Obsessed π
Anyway bestie, this page lives in ./mm and it's dated October 2026, and the whole thing answers to pcpu_balance_populated(9). Slay, stay hydrated, and mind your populated pages π
β¨π
π¦ 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