]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup/rdma: add rdma.events.local for per-cgroup allocation failure attribution
authorTao Cui <cuitao@kylinos.cn>
Thu, 14 May 2026 06:50:33 +0000 (14:50 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 14 May 2026 21:22:55 +0000 (11:22 -1000)
commitaefe4847f0891e2e71bedf5478d1cf350f86fc61
tree9abdbeb1e3e68c637b501b4db5af0b65f3e0124e
parent009bcbd0b201d4dc125eb960a61cb6d4d9fdfc72
cgroup/rdma: add rdma.events.local for per-cgroup allocation failure attribution

Add per-cgroup local event counters to track RDMA resource limit
exhaustion from the perspective of individual cgroups. The
rdma.events.local file reports two per-resource counters:

- max: number of times this cgroup's limit was the one that blocked
  an allocation in the subtree
- alloc_fail: number of allocation attempts originating from this
  cgroup that failed due to an ancestor's limit

This mirrors the design of pids.events.local, where events are
attributed to the cgroup that imposed the limit, not necessarily the
cgroup where the allocation was attempted.

Also extend rdma.events with a hierarchical alloc_fail counter that
tracks allocation failures propagating upward from the requesting
cgroup, complementing the existing max counter, so that rdma.events
and rdma.events.local share the same output format.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup_rdma.h
kernel/cgroup/rdma.c