mm/compaction.c
Source file repositories/reference/linux-study-clean/mm/compaction.c
File Facts
- System
- Linux kernel
- Corpus path
mm/compaction.c- Extension
.c- Size
- 95241 bytes
- Lines
- 3357
- 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/cpu.hlinux/swap.hlinux/migrate.hlinux/compaction.hlinux/mm_inline.hlinux/sched/signal.hlinux/backing-dev.hlinux/sysctl.hlinux/sysfs.hlinux/page-isolation.hlinux/kasan.hlinux/kthread.hlinux/freezer.hlinux/page_owner.hlinux/psi.hlinux/cpuset.hinternal.htrace/events/compaction.h
Detected Declarations
function count_compact_eventfunction count_compact_eventsfunction is_via_compact_memoryfunction is_via_compact_memoryfunction release_free_listfunction list_for_each_entry_safefunction defer_compactionfunction compaction_deferredfunction succeededfunction compaction_restartingfunction isolation_suitablefunction reset_cached_positionsfunction skip_offline_sectionsfunction skip_offline_sections_reversefunction skip_offline_sectionsfunction skip_offline_sections_reversefunction pageblock_skip_persistentfunction __reset_isolation_pfnfunction __reset_isolation_suitablefunction reset_isolation_suitablefunction test_and_set_skipfunction update_cached_migratefunction update_pageblock_skipfunction isolation_suitablefunction pageblock_skip_persistentfunction update_pageblock_skipfunction compact_lock_irqsavefunction compact_folio_lruvec_lock_irqsavefunction need_reschedfunction isolate_freepages_blockfunction isolate_freepages_rangefunction too_many_isolatedfunction skip_isolation_on_orderfunction isolate_migratepages_blockfunction lockfunction isolate_or_dissolve_huge_foliofunction scannedfunction isolate_migratepages_rangefunction suitable_migration_sourcefunction suitable_migration_targetfunction freelist_scan_limitfunction compact_scanners_metfunction move_freelist_headfunction move_freelist_tailfunction fast_isolate_aroundfunction next_search_orderfunction fast_isolate_freepagesfunction list_for_each_entry_reverse
Annotated Snippet
subsys_initcall(kcompactd_init)
#endif /* CONFIG_COMPACTION */
Annotation
- Immediate include surface: `linux/cpu.h`, `linux/swap.h`, `linux/migrate.h`, `linux/compaction.h`, `linux/mm_inline.h`, `linux/sched/signal.h`, `linux/backing-dev.h`, `linux/sysctl.h`.
- Detected declarations: `function count_compact_event`, `function count_compact_events`, `function is_via_compact_memory`, `function is_via_compact_memory`, `function release_free_list`, `function list_for_each_entry_safe`, `function defer_compaction`, `function compaction_deferred`, `function succeeded`, `function compaction_restarting`.
- 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.