From: Yosry Ahmed <yosry.ahmed@linux.dev>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: JP Kobryn <inwardvessel@gmail.com>,
tj@kernel.org, mhocko@kernel.org, hannes@cmpxchg.org,
akpm@linux-foundation.org, linux-mm@kvack.org,
cgroups@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH 00/11] cgroup: separate rstat trees
Date: Mon, 24 Feb 2025 21:54:37 +0000 [thread overview]
Message-ID: <Z7zqnTcJCHPHO418@google.com> (raw)
In-Reply-To: <k3ymi6ipegswgeqbduotm2pwrkimkubv7imjpzxuiluhtd5iuu@defld6yydzyb>
On Mon, Feb 24, 2025 at 01:13:35PM -0800, Shakeel Butt wrote:
> On Thu, Feb 20, 2025 at 08:04:02PM +0000, Yosry Ahmed wrote:
> > On Thu, Feb 20, 2025 at 10:14:45AM -0800, JP Kobryn wrote:
> > > On 2/20/25 9:59 AM, Yosry Ahmed wrote:
> > > > On Thu, Feb 20, 2025 at 09:53:33AM -0800, Shakeel Butt wrote:
> > > > > On Thu, Feb 20, 2025 at 05:26:04PM +0000, Yosry Ahmed wrote:
> > > > > >
> > > > > > Another question is, does it make sense to keep BPF flushing in the
> > > > > > "self" css with base stats flushing for now? IIUC BPF flushing is not
> > > > > > very popular now anyway, and doing so will remove the need to support
> > > > > > flushing and updating things that are not css's. Just food for thought.
> > > > > >
> > > > >
> > > > > Oh if this simplifies the code, I would say go for it.
> > > >
> > > > I think we wouldn't need cgroup_rstat_ops and some of the refactoring
> > > > may not be needed. It will also reduce the memory overhead, and keep it
> > > > constant regardless of using BPF which is nice.
> > >
> > > Yes, this is true. cgroup_rstat_ops was only added to allow cgroup_bpf
> > > to make use of rstat. If the bpf flushing remains tied to
> > > cgroup_subsys_state::self, then the ops interface and supporting code
> > > can be removed. Probably stating the obvious but the trade-off would be
> > > that if bpf cgroups are in use, they would account for some extra
> > > overhead while flushing the base stats. Is Google making use of bpf-
> > > based cgroups?
> >
> > Ironically I don't know, but I don't expect the BPF flushing to be
> > expensive enough to affect this. If someone has the use case that loads
> > enough BPF programs to cause a noticeable impact, we can address it
> > then.
> >
> > This series will still be an improvement anyway.
>
> If no one is using the bpf+rstat infra then maybe we should rip it out.
> Do you have any concerns?
We did not end up using the BPF+rstat infra, so I have no objection over
removing that. They are kfuncs and supposedly there is no guarantee for
them hanging around.
However, looking back at the patch series [1], there were 3 main
components:
(a) cgroup_iter BPF programs support.
(b) kfunc hooks for BPF+rstat infra.
(c) Selftests.
I am not sure if there are other users for cgroup_iter for different
purposes than BPF+rstat, and I am not sure if we can remove an iterator
program type (in terms of stability).
We can drop the kfunc hooks, but they are not really a big deal imo. I
am fine either way.
If we remove (b) we can also remove the corresponding test, but not the
test for cgroup_iter as long as it stays.
[1]https://lore.kernel.org/all/20220824233117.1312810-1-haoluo@google.com/
prev parent reply other threads:[~2025-02-24 21:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 3:14 [PATCH 00/11] cgroup: separate rstat trees JP Kobryn
2025-02-18 3:14 ` [PATCH 01/11] cgroup: move rstat pointers into struct of their own JP Kobryn
2025-02-19 1:05 ` Shakeel Butt
2025-02-19 1:23 ` Shakeel Butt
2025-02-20 16:53 ` Yosry Ahmed
2025-02-24 17:06 ` JP Kobryn
2025-02-24 18:36 ` Yosry Ahmed
2025-02-18 3:14 ` [PATCH 02/11] cgroup: add level of indirection for cgroup_rstat struct JP Kobryn
2025-02-19 2:26 ` Shakeel Butt
2025-02-20 17:08 ` Yosry Ahmed
2025-02-19 5:57 ` kernel test robot
2025-02-18 3:14 ` [PATCH 03/11] cgroup: move cgroup_rstat from cgroup to cgroup_subsys_state JP Kobryn
2025-02-20 17:06 ` Shakeel Butt
2025-02-20 17:22 ` Yosry Ahmed
2025-02-25 19:20 ` JP Kobryn
2025-02-18 3:14 ` [PATCH 04/11] cgroup: introduce cgroup_rstat_ops JP Kobryn
2025-02-19 7:21 ` kernel test robot
2025-02-20 17:50 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 05/11] cgroup: separate rstat for bpf cgroups JP Kobryn
2025-02-21 18:14 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 06/11] cgroup: rstat lock indirection JP Kobryn
2025-02-21 22:09 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 07/11] cgroup: fetch cpu-specific lock in rstat cpu lock helpers JP Kobryn
2025-02-21 22:35 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 08/11] cgroup: rstat cpu lock indirection JP Kobryn
2025-02-19 8:48 ` kernel test robot
2025-02-22 0:18 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 09/11] cgroup: separate rstat locks for bpf cgroups JP Kobryn
2025-02-18 3:14 ` [PATCH 10/11] cgroup: separate rstat locks for subsystems JP Kobryn
2025-02-22 0:23 ` Shakeel Butt
2025-02-18 3:14 ` [PATCH 11/11] cgroup: separate rstat list pointers from base stats JP Kobryn
2025-02-22 0:28 ` Shakeel Butt
2025-02-20 15:51 ` [PATCH 00/11] cgroup: separate rstat trees Tejun Heo
2025-02-27 23:44 ` JP Kobryn
2025-02-20 17:26 ` Yosry Ahmed
2025-02-20 17:53 ` Shakeel Butt
2025-02-20 17:59 ` Yosry Ahmed
2025-02-20 18:14 ` JP Kobryn
2025-02-20 20:04 ` Yosry Ahmed
2025-02-20 20:22 ` Yosry Ahmed
2025-02-24 21:13 ` Shakeel Butt
2025-02-24 21:54 ` Yosry Ahmed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z7zqnTcJCHPHO418@google.com \
--to=yosry.ahmed@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=inwardvessel@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).