Support OomGroupKill in cgroup2 memory events stats
oom_group_kill cgroup events have been added to the linux kernel around a year ago: https://github.com/torvalds/linux/commit/b6bf9abb0aa44e53ffe9c1e6e1d32568f5b25e4a
This is an event which tracks how many times the entire cgroup is "group" killed, in addition to the single process oom kills tracked by the existing oom_kill event. See https://docs.kernel.org/admin-guide/cgroup-v2.html#controllers for details about oom grouping:
memory.oom.group
A read-write single value file which exists on non-root cgroups. The default value is "0".
Determines whether the cgroup should be treated as an indivisible workload by the OOM killer. If set, all tasks belonging to the cgroup or to its descendants (if the memory cgroup is not a leaf cgroup) are killed together or not at all. This can be used to avoid partial kills to guarantee workload integrity.
...
I believe support for this event will need to be added to these three places (see existing oom_kill event for example): https://github.com/containerd/cgroups/blob/main/cgroup2/stats/metrics.proto https://github.com/containerd/cgroups/blob/main/cgroup2/stats/metrics.pb.txt https://github.com/containerd/cgroups/blob/main/cgroup2/manager.go
Accepted. @sparrc do you still want to work on it? If not, I will send pull request thanks