Re: [PATCH v3 4/8] cgroup: rstat: support cgroup1

2021-02-18 Thread Johannes Weiner
On Thu, Feb 18, 2021 at 04:45:11PM +0100, Michal Koutný wrote: > On Wed, Feb 17, 2021 at 03:52:59PM -0500, Johannes Weiner > wrote: > > In this case, we're talking about a relatively small data structure > > and the overhead is per mountpoint. > IIUC, it is per each mountpoint's number of cgroups

Re: [PATCH v3 4/8] cgroup: rstat: support cgroup1

2021-02-18 Thread Michal Koutný
On Wed, Feb 17, 2021 at 03:52:59PM -0500, Johannes Weiner wrote: > It's possible, but I don't think worth the trouble. You're right. I gave it a deeper look and what would be saved on data, would be paid in code complexity. > In this case, we're talking about a relatively small data structure >

Re: [PATCH v3 4/8] cgroup: rstat: support cgroup1

2021-02-17 Thread Johannes Weiner
On Wed, Feb 17, 2021 at 06:42:32PM +0100, Michal Koutný wrote: > Hello. > > On Tue, Feb 09, 2021 at 11:33:00AM -0500, Johannes Weiner > wrote: > > @@ -1971,10 +1978,14 @@ int cgroup_setup_root(struct cgroup_root *root, u16 > > ss_mask) > > if (ret) > > goto destroy_root; > > >

Re: [PATCH v3 4/8] cgroup: rstat: support cgroup1

2021-02-17 Thread Michal Koutný
Hello. On Tue, Feb 09, 2021 at 11:33:00AM -0500, Johannes Weiner wrote: > @@ -1971,10 +1978,14 @@ int cgroup_setup_root(struct cgroup_root *root, u16 > ss_mask) > if (ret) > goto destroy_root; > > - ret = rebind_subsystems(root, ss_mask); > + ret = cgroup_rstat_ini

[PATCH v3 4/8] cgroup: rstat: support cgroup1

2021-02-09 Thread Johannes Weiner
Rstat currently only supports the default hierarchy in cgroup2. In order to replace memcg's private stats infrastructure - used in both cgroup1 and cgroup2 - with rstat, the latter needs to support cgroup1. The initialization and destruction callbacks for regular cgroups are already in place. Remo