pcpu_get_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 to 0 and 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:


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