pcpu_block_update_hint_free(9)
๐ NAME ๐
Okay bestie, welcome to pcpu_block_update_hint_free(9) from the Kernel API Manual โจ This one is literally called pcpu_block_update_hint_free โ it updates the block hints on the free path ๐ซถ
๐ธ SYNOPSIS ๐ธ
void pcpu_block_update_hint_free (struct pcpu_chunk *chunk , int bit_off
, int bits );
๐ฆ ARGUMENTS ๐ฆ
chunkโ chunk of interest ๐ the one we're looking atbit_offโ chunk offset ๐bitsโ size of request ๐งฎ
๐ DESCRIPTION ๐
So what this icon actually does: it updates metadata for the allocation path. The whole point is that this avoids a blind block refresh by making use of the block contig hints โ like, why blindly refresh when the hints are right there? ๐โโ๏ธ If that fails, it scans forward and backward to determine the extent of the free area. That scan is capped at the boundary of blocks, no cap beyond the block boundary periodt ๐
A chunk update is triggered if a page becomes free, a block becomes free, or the free spans across blocks. This tradeoff is to minimize iterating over the block metadata to update chunk_md->contig_hint. Heads up bestie: chunk_md->contig_hint may be off by up to a page, but it will never be more than the available space. If the contig hint is contained in one block, it will be accurate ๐ฏ
No cap, but literally there is a cap: the free-area scan stops at the block boundary ๐ง
๐ SEE ALSO ๐
Kernel file ./mm/percpu.c is the home base ๐ and these are the besties listed in SEE ALSO:
pcpu_addr_in_chunk(9)pcpu_check_block_hint(9)pcpu_next_md_free_region(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_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)
Later bestie, mwah ๐ โ source ./mm, dated October 2026 ๐โจ
๐ฆ 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