mm/memcontrol-v1.c
Source file repositories/reference/linux-study-clean/mm/memcontrol-v1.c
File Facts
- System
- Linux kernel
- Corpus path
mm/memcontrol-v1.c- Extension
.c- Size
- 58154 bytes
- Lines
- 2280
- 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/memcontrol.hlinux/swap.hlinux/mm_inline.hlinux/pagewalk.hlinux/backing-dev.hlinux/eventfd.hlinux/poll.hlinux/sort.hlinux/file.hlinux/seq_buf.hinternal.hswap.hswap_table.hmemcontrol-v1.h
Detected Declarations
struct mem_cgroup_tree_per_nodestruct mem_cgroup_treestruct mem_cgroup_eventfd_liststruct mem_cgroup_eventstruct memcg1_events_percpustruct oom_wait_infostruct numa_statenum mem_cgroup_events_targetfunction __mem_cgroup_insert_exceededfunction __mem_cgroup_remove_exceededfunction mem_cgroup_remove_exceededfunction soft_limit_excessfunction memcg1_update_treefunction memcg1_remove_from_treesfunction for_each_nodefunction __mem_cgroup_largest_soft_limit_nodefunction mem_cgroup_largest_soft_limit_nodefunction mem_cgroup_soft_reclaimfunction memcg1_soft_limit_reclaimfunction mem_cgroup_move_charge_readfunction mem_cgroup_move_charge_writefunction mem_cgroup_move_charge_writefunction mem_cgroup_usagefunction __mem_cgroup_thresholdfunction mem_cgroup_thresholdfunction memcg1_charge_statisticsfunction memcg1_event_ratelimitfunction memcg1_check_eventsfunction memcg1_commit_chargefunction __memcg1_swapoutfunction memcg1_swapinfunction memcg1_uncharge_batchfunction compare_thresholdsfunction mem_cgroup_oom_notify_cbfunction mem_cgroup_oom_notifyfunction __mem_cgroup_usage_register_eventfunction mem_cgroup_usage_register_eventfunction memsw_cgroup_usage_register_eventfunction __mem_cgroup_usage_unregister_eventfunction mem_cgroup_usage_unregister_eventfunction memsw_cgroup_usage_unregister_eventfunction mem_cgroup_oom_register_eventfunction mem_cgroup_oom_unregister_eventfunction list_for_each_entry_safefunction memcg_event_removefunction memcg_event_wakefunction memcg_event_ptable_queue_procfunction memcg_write_event_control
Annotated Snippet
subsys_initcall(memcg1_init);
Annotation
- Immediate include surface: `linux/memcontrol.h`, `linux/swap.h`, `linux/mm_inline.h`, `linux/pagewalk.h`, `linux/backing-dev.h`, `linux/eventfd.h`, `linux/poll.h`, `linux/sort.h`.
- Detected declarations: `struct mem_cgroup_tree_per_node`, `struct mem_cgroup_tree`, `struct mem_cgroup_eventfd_list`, `struct mem_cgroup_event`, `struct memcg1_events_percpu`, `struct oom_wait_info`, `struct numa_stat`, `enum mem_cgroup_events_target`, `function __mem_cgroup_insert_exceeded`, `function __mem_cgroup_remove_exceeded`.
- 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.