Re: [PATCH] kernel/cgroup/pids: add "pids.forks" counter
From: Max Kellermann
Date: Mon May 05 2025 - 08:49:36 EST
On Fri, May 2, 2025 at 8:37 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
> +1 on pids.stat, and use rstat and avoid the atomic ops?
rstat right now is specific to the "cpu" controller. There is "struct
cgroup_rstat_cpu". And there is "struct cgroup_base_stat", but that is
also specific to the "cpu" controller.
Do you want me to create a whole new subsystem like the "cpu" rstat
(i.e. copy the syncing code), or do you want to add the new counter to
cgroup_rstat_cpu? (And maybe drop the "_cpu" suffix from the struct
name?)
(I have doubts that all the complexity is really worth it for a
counter that gets updated only on fork/clone. cpu_rstat is designed
for updating counters on every context switch.)