Hello.
Something like this would come quite handy.
On Mon, Feb 12, 2024 at 12:10:38PM +0800, "Jan Kratochvil (Azul)" <jkratochvil@xxxxxxxx> wrote:
which are useful for userland to easily and performance-wise find out theAnd the only way to figure out inside cgroupns.
effective cgroup limits being applied.
But for cgroup2 it has been missing so far, this is just a copy-paste of theI was thinking of memory.max.effective (and others).
cgroup1 code while changing s/memsw/swap/ as that is what cgroup1 vs. cgroup2
tracks. I have added it to the end of "memory.stat" to prevent possible
compatibility problems with existing code parsing that file.
- no need to (possibly flush) stats when reading memory.stat
- can be generalized also for pids controller (and other "limiting" controllers)
- analogous to precedent of cpuset.cpus.effective
Whereas, using v1 approach in v2:
- memory.stat mixes true stats and limits,
- memmory.stat is hierarchical by default, no need for the prefix.
What do you think of the separate .effective file(s)?