On Sat, Sep 16, 2023 at 1:31 AM Tejun Heo <tj@xxxxxxxxxx> wrote: > > On Fri, Sep 15, 2023 at 07:01:28PM +0200, Michal Koutný wrote: > > Hello. > > > > On Tue, Sep 12, 2023 at 11:30:32AM +0800, Yafang Shao <laoar.shao@xxxxxxxxx> wrote: > > > With the above changes, I think it can meet most use cases with BPF on cgroup1. > > > What do you think ? > > > > I think the presented use case of LSM hooks is better served by the > > default hierarchy (see also [1]). > > Relying on a chosen subsys v1 hierarchy is not systematic. And extending > > ancestry checking on named v1 hierarchies seems backwards given > > the existence of the default hierarchy. > > Yeah, identifying cgroup1 hierarchies by subsys leave out pretty good chunk > of usecases - e.g. systemd used to use a named hierarchy for primary process > organization on cgroup1. Systemd-managed tasks invariably have one or more cgroup controllers enabled, as exemplified by entries like "/sys/fs/cgroup/cpu/{system.slice, user.slice, XXX.service}". Consequently, the presence of a cgroup controller can be employed as an indicator to identify a systemd-managed task. > > Also, you don't have to switch to cgroup2 wholesale. You can just build the > same hierarchy in cgroup2 for process organization and combine that with any > cgroup1 hierarchies. The challenge lies in the need to adapt a multitude of applications to this system, and furthermore, not all of these applications are under our direct management. This poses a formidable task. -- Regards Yafang