pcpu_pre_unmap_flush(9)
π
pcpu_pre_unmap_flush(9) π
okay bestie, welcome to the Kernel API Manual page for pcpu_pre_unmap_flush(9) β yes, that's the whole title vibe, and we're gonna get you comfy with it π«Άβ¨
πΈ NAME πΈ
pcpu_pre_unmap_flush β flush cache prior to unmapping. no cap, that's the whole point π
β¨ SYNOPSIS β¨
void pcpu_pre_unmap_flush (struct pcpu_chunk *chunk , int page_start , int page_end );
π ARGUMENTS π
chunkβ the chunk that owns the regions we're about to flush, bestie.page_startβ page index of the first page to be flushed.page_endβ page index of the last page to be flushed + 1 (yes, plus one, that's the bit π).
π¦ DESCRIPTION π¦
okay so picture it: pages in [page_start,page_end) of chunk are about to be unmapped. The move is to flush cache. And because each flushing trial can be very expensive, we issue flush on the whole region at once rather than doing it for each cpu. Yes, this could be an overkill, but it is more scalable β iconic behavior, honestly. π
π SEE ALSO π
Kernel file ./mm/percpu-vm.c β that's where this lives, and the whole related squad is:
pcpu_get_pages(9)pcpu_free_pages(9)pcpu_alloc_pages(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)
mwah π β source ./mm, dated October 2026, and it's pcpu_pre_unmap_flush(9) from the Kernel API Manual, periodt. π
π¦ 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