Re: [RFC] cgroup: Fix /proc/cgroups count for v2

From: Michal Koutný
Date: Mon May 27 2024 - 07:54:43 EST


On Fri, May 24, 2024 at 10:36:45AM GMT, "T.J. Mercier" <tjmercier@xxxxxxxxxx> wrote:
> On Fri, May 24, 2024 at 7:23 AM Michal Koutný <mkoutny@xxxxxxxx> wrote:
> Sometimes? Take freezer as an example. If you don't mount it on v1
> then /proc/cgroups currently advertises the total number of v2
> cgroups. I thought that was reasonable since there exists a
> cgroup.freeze in every cgroup, but does freezer really count as a
> controller in this case?

v1 freezer controller and freezing implementation in v2 are different
things.
Before v1 mounting, the freezer* entry points to the v2 hierarchy (which
causes listing it as realized for each (v2) cgroup but that's not true).

> There's no freezer css for each cgroup

Exactly.

> so I guess the better answer is just to report 1 like you suggest.

It matches better the reality of alloc'd css objects.

Michal

*) Same for any v1-only controller.

Attachment: signature.asc
Description: PGP signature