pcpu_next_md_free_region(9)
π pcpu_next_md_free_region(9) π
okay so this entire page is from the Kernel API Manual, and itβs here to explain one very specific little helper. Itβs giving βdeep in the kernel group chatβ energy, and honestly? iconic.
β¨ NAME β¨
pcpu_next_md_free_region β finds the next hint free area π―
π SYNOPSIS π
void pcpu_next_md_free_region (struct pcpu_chunk *chunk , int *bit_off ,
int *bits );
π§ ARGUMENTS π§
chunkβ chunk of interest, bestie. Thatβs the chunk weβre looking at.bit_offβ chunk offset.bitsβ size of free area.
π DESCRIPTION π
So this is a helper function for pcpu_for_each_md_free_region. No cap.
It checks block->contig_hint and performs aggregation across blocks to find the next hint. The way it does that is very βmain character energyβ: it modifies bit_off and bits in-place to be consumed in the loop. β¨
In-place updates are the vibe here βbit_offandbitsget changed right where they are, and thatβs exactly what the loop expects. π
π¦ SEE ALSO π¦
Kernel file: ./mm/percpu.c β plus the whole related squad below:
pcpu_addr_in_chunk(9)pcpu_check_block_hint(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)
Source/version: ./mm Β· Date: October 2026 Β· Page: pcpu_next_md_free_region(9) β thatβs the footer, bestie, and we ate π
π
π¦ 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