pcpu_depopulate_chunk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pcpu_depopulate_chunk β€” a.k.a. the Kernel API Manual glow-up πŸ¦‹

okay so bestie, welcome to the pcpu_depopulate_chunk(9) page β€” yes that's the function name and the manual name, we love a multitasking icon πŸ‘‘


✨ NAME ✨

pcpu_depopulate_chunk β€” depopulate and unmap an area of a pcpu_chunk. two jobs, one function, main character energy fr fr πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void pcpu_depopulate_chunk (struct pcpu_chunk *chunk , int page_start ,
       int page_end );

like, that's the whole vibe. void return, no notes. 🫢


🌸 ARGUMENTS 🌸

  • chunk β€” the chunk to depopulate. this is the girl we're clearing out ✨
  • page_start β€” the start page. where the chaos begins πŸ“
  • page_end β€” the end page. where the chaos stops πŸ“

πŸ’– DESCRIPTION πŸ’–

so for each cpu (like, every single one, no skipping 😀), it depopulates and unmaps the pages in [page_start,page_end) from chunk. inclusive start, exclusive end, the way that bracket notation literally always is, iykyk 🧚

⚠️ heads up bestie β€” the caller is required to call pcpu_post_unmap_tlb_flush if it's not returning the region back to vmalloc, which will lazily flush the tlb. not optional, not a suggestion, this is the rule πŸ™ˆ

πŸ’€ CONTEXT πŸ’€

pcpu_alloc_mutex. that's it. that's the whole section. lock in (literally) πŸ”₯


🌈 SEE ALSO 🌈

kernel file ./mm/percpu-vm.c plus the whole friend group:


and that's the page, bestie πŸŽ€ sign-off szn: this one lives in ./mm, it's the October 2026 edition, and it's filed under pcpu_depopulate_chunk(9) β€” no cap, go slay your percpu cleanup πŸ’œβœ¨

πŸ“¦ where this page comes from