Hello,Currently, I use the for_each_css() macro for iteration. If you mean displaying all the possible cgroup subsystems even if they are not enabled for the current cgroup, I will have to manually do the iteration.
On Thu, Jul 11, 2024 at 10:05:22AM -0400, Waiman Long wrote:
Given the fact that for_each_css() iteration is filtering out csses that areI think it'd be better to have all the keys. There are some dynamic keys in
absent, the dying counts follow the same logic of skipping it if there is no
dying css. That also makes it easier to identify cgroups with dying
descendant csses as we don't need filter out entries with a 0 dying count.
It also makes the output less verbose and let user focus more on what are
significant.
I do understand that it makes it inconsistent with the ways nr_descendants
and nr_dying_descendants are being handled as entries with 0 count are also
displayed. I can update the patch to display those entries with 0 dying
subsys count if other people also think that is the better way forward.
stat files but those are mostly for things which can come and go (e.g. block
and misc devices), so yeah, I think it'd be better to show all the keys even
when they're zero.
Also, I personally would much prefer if the same prefixes are collected
together - ie. totals first and then dying. It's just a lot easier on the
eyes that way.
nr_subsys_cpu
nr_subsys_memory
nr_subsys_io
...
nr_dying_subsys_cpu
nr_dying_subsys_memory
nr_dying_subsys_io
...