pcpu_get_pages(9)
hey bestie π welcome to the <pink>pcpu_get_pages(9)</pink> page from the Kernel API Manual. itβs short, itβs useful, and itβs about to make sense, fr fr.
πΈ NAME πΈ
pcpu_get_pages β get temp pages array β¨
β¨ SYNOPSIS β¨
the whole signature is giving:
struct page ** pcpu_get_pages (gfp_t gfp );
π ARGUMENTS π
gfpβ the allocation flags you pass to the underlying allocator. set it to0and it will only return the cached array. thatβs the whole vibe check π«Ά
π¦ DESCRIPTION π¦
okay so this returns a pointer to an array of pointers to struct page β and you can index that array with pcpu_page_idx. lowkey important: there is only one array, so accesses should be serialized by pcpu_alloc_mutex. no cap, donβt be messy about that π
π RETURN π
Pointer to temp pages array on success π₯
π SEE ALSO π
the kernel file is ./mm/percpu-vm.c, and the bestie list is:
pcpu_free_pages(9)pcpu_alloc_pages(9)pcpu_pre_unmap_flush(9)pcpu_unmap_pages(9)pcpu_post_unmap_tlb_flush(9)pcpu_map_pages(9)pcpu_post_map_flush(9)pcpu_populate_chunk(9)pcpu_depopulate_chunk(9)pcpu_should_reclaim_chunk(9)
thatβs the whole page, bestie π«Ά signing off from source/version ./mm, dated October 2026, with pcpu_get_pages(9) energy π
π¦ 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