mm/percpu.c
Source file repositories/reference/linux-study-clean/mm/percpu.c
File Facts
- System
- Linux kernel
- Corpus path
mm/percpu.c- Extension
.c- Size
- 102885 bytes
- Lines
- 3389
- Domain
- Core OS
- Bucket
- Memory Management
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitmap.hlinux/cpumask.hlinux/memblock.hlinux/err.hlinux/list.hlinux/log2.hlinux/mm.hlinux/module.hlinux/mutex.hlinux/percpu.hlinux/pfn.hlinux/slab.hlinux/spinlock.hlinux/vmalloc.hlinux/workqueue.hlinux/kmemleak.hlinux/sched.hlinux/sched/mm.hlinux/memcontrol.hasm/cacheflush.hasm/sections.hasm/tlbflush.hasm/io.htrace/events/percpu.hpercpu-internal.hpercpu-km.cpercpu-vm.clinux/pgalloc.h
Detected Declarations
function pcpu_schedule_balance_workfunction pcpu_addr_in_chunkfunction __pcpu_size_to_slotfunction pcpu_size_to_slotfunction pcpu_chunk_slotfunction pcpu_set_page_chunkfunction pcpu_page_idxfunction pcpu_unit_page_offsetfunction pcpu_chunk_addrfunction pcpu_off_to_block_indexfunction pcpu_off_to_block_offfunction pcpu_block_off_to_offfunction pcpu_check_block_hintfunction pcpu_next_hintfunction pcpu_next_md_free_regionfunction pcpu_next_fit_regionfunction pcpu_mem_freefunction __pcpu_chunk_movefunction pcpu_chunk_movefunction pcpu_chunk_relocatefunction pcpu_isolate_chunkfunction pcpu_reintegrate_chunkfunction pcpu_update_empty_pagesfunction pcpu_region_overlapfunction pcpu_block_updatefunction pcpu_find_block_fitfunction pcpu_chunk_refresh_hintfunction pcpu_block_refresh_hintfunction pcpu_block_update_hint_allocfunction pcpu_block_update_hint_freefunction pcpu_is_populatedfunction pcpu_find_block_fitfunction bitmap_find_next_zero_area_offfunction pcpu_alloc_areafunction pcpu_free_areafunction pcpu_init_md_blockfunction pcpu_init_md_blocksfunction pcpu_alloc_first_chunkfunction pcpu_free_chunkfunction pcpu_chunk_populatedfunction pcpu_chunk_depopulatedfunction pcpu_memcg_pre_alloc_hookfunction pcpu_memcg_post_alloc_hookfunction pcpu_memcg_free_hookfunction pcpu_memcg_pre_alloc_hookfunction pcpu_memcg_post_alloc_hookfunction pcpu_alloc_tag_free_hookfunction pcpu_alloc_tag_alloc_hook
Annotated Snippet
subsys_initcall(percpu_enable_async);
Annotation
- Immediate include surface: `linux/bitmap.h`, `linux/cpumask.h`, `linux/memblock.h`, `linux/err.h`, `linux/list.h`, `linux/log2.h`, `linux/mm.h`, `linux/module.h`.
- Detected declarations: `function pcpu_schedule_balance_work`, `function pcpu_addr_in_chunk`, `function __pcpu_size_to_slot`, `function pcpu_size_to_slot`, `function pcpu_chunk_slot`, `function pcpu_set_page_chunk`, `function pcpu_page_idx`, `function pcpu_unit_page_offset`, `function pcpu_chunk_addr`, `function pcpu_off_to_block_index`.
- Atlas domain: Core OS / Memory Management.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.