mirror of
https://github.com/troglobit/finit.git
synced 2026-10-16 10:39:35 +00:00
initctl: resolve hierarchical cgroup limits
Cgroups v2 limits are hierarchical - a process is constrained by the most restrictive limit in its ancestor chain, not just its immediate cgroup. This patch updates cg_conf() to walk up the hierarchy and report effective limits by comparing values at each level. This fixes incorrect "max" (unlimited) reporting in 'initctl --json status', 'initctl cgroup', and 'initctl top' when child cgroups have no explicit limits but parents do. For memory.max and cpu.max: take minimum (most restrictive) For memory.min: take maximum (most protection) Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
2 files changed
+134
-2
No files matched your search
@@ -33,6 +33,8 @@ All relevant changes are documented in this file.
|
||||
scroll wheel and Shift+PgUp/PgDn sometimes would not work properly
|
||||
- Fix flickering and artifacts in `initctl top`
|
||||
- Fix file descriptor leak in `initctl top`
|
||||
- Fix incorrect "max" limit reporting in `initctl [top|cgroup|--json]` output
|
||||
for child cgroups. Resolves effective limits by walking the cgroup hierarchy
|
||||
- Ensure mount/unmount skips `noauto` entries
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user