[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKPOu+_8cbUk=8d41GQGOvUrmG9OuaNVuSQrksDcUQMyFc4tiA@mail.gmail.com>
Date: Fri, 2 May 2025 15:23:26 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: tj@...nel.org, hannes@...xchg.org, cgroups@...r.kernel.org.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/cgroup/pids: add "pids.forks" counter
On Fri, May 2, 2025 at 2:55 PM Michal Koutný <mkoutny@...e.com> wrote:
> bpftrace <<EOD
Sure you can do everything with BPF, but that's several magnitudes
more overhead (if you worry about the atomic operation in my patch).
Your script is a nice PoC that demonstrates the power and simplicity
of BPF (I love BPF!), but we want to monitor all servers permanently
and log every counter of every cgroup. Later, if we see (performance)
problems, we can reconstruct from those logs what/who may have caused
them. The fork counter is an interesting detail for this.
> It would conceptually fit better as a pids.stat:forks (but there's no
> pids.stat unlike other controllers')
That would be fine for me. Maybe that's one reason to initially add
"pids.stat", and then maybe people figure out more stuff to put there?
If you wish, I can implement that.
> But I don't know this new field justifies introductions of a cgroup
> attribute and (yet) another atomic operation on the forking path.
>
> Does the value have long-term or broad use?
It's very useful for us and that justifies the (small) memory+atomic
overhead, but others may have a different opinion. If you don't find
it useful, we'll just keep the patch in our private kernel fork (like
dozens of others).
Max
Powered by blists - more mailing lists