linux/kernel/cgroup/cgroup.c
Imported from
_research/manual-study-linux/file-notes/linux__kernel__cgroup__cgroup.c.md.
File Notes: kernel/cgroup/cgroup.c
Status: reviewed.
Purpose: cgroup hierarchy and resource-control implementation.
Review target: hierarchy model, controllers, membership, lifecycle, and AI-job resource boundaries.
Evidence
- The file implements the generic process-grouping system.
cgroup_mutexandcss_set_lockare documented as core synchronization boundaries around lines 71-82.- Separate cgroup workqueues for offline/release/free work are documented around lines 109-138.
- Controller arrays are generated from
linux/cgroup_subsys.haround lines 140-151. - The default hierarchy root appears around line 179.
Design Notes
Cgroups combine hierarchy, membership, controller policy, stats, and lifecycle. AI job sandboxes should borrow that shape: resource domains with explicit membership, limits, teardown, and telemetry.