pcpu_addr_in_chunk(9)
π pcpu_addr_in_chunk β the "is this even yours??" check
okay so quick vibe check: this is a page from the Kernel API Manual (section 9, kernel internals bestie π§) and honestly it's a tiny little function with one job and it slays at that job. Let's get into it β¨
πΈ NAME πΈ
pcpu_addr_in_chunk β literally just checks if the address is served from this chunk π
like, that's it. that's the whole personality. no cap.
π¦ SYNOPSIS π¦
bool pcpu_addr_in_chunk (struct pcpu_chunk *chunk , void *addr );
yes she returns a bool and yes she takes two args. we love a simple signature, periodt π
π ARGUMENTS π
chunkβ the chunk of interest π«Ά like, the chunk you're being nosy about. the one you're asking "is this yours??"addrβ a percpu address π« the address in question, the main character of this whole situation
β RETURN β
Returns True if the address is served from this chunk. π₯ that's the whole answer. yes or no. iconic.
ngl if it's not from this chunk you get False β the original only spells out the true case, so don't come for me π
π SEE ALSO π
This part is long bestie, buckle up. Every single one of these is part of the percpu saga, and the kernel file lives at ./mm/percpu.c π:
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_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)
that's the whole percpu friend group fr fr π they all show up together, iykyk.
π the cute sign-off π
this little baddie lives in ./mm π and the page is dated October 2026 π so yeah, future vibes, we love to see it. go forth and check your addresses bestie, you got this π
β¨
π¦ 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