Re: [RFC PATCH v2] cgroup: Track time in cgroup v2 freezer

From: Tejun Heo
Date: Thu Jul 17 2025 - 13:09:07 EST


Hello,

On Thu, Jul 17, 2025 at 02:56:13PM +0200, Michal Koutný wrote:
...
> > + cgroup.freeze.stat
>
> With the given implementation (and use scenario), this'd better exposed
> in
> cgroup.freeze.stat.local
>
> I grok the hierarchical summing would make little sense and it'd make
> implementaion more complex. With that I'm thinking about formulation:
>
> Cumulative time that cgroup has spent between freezing and
> thawing, regardless of whether by self or ancestor cgroups. NB
> (not) reaching "frozen" state is not accounted here.

I wonder what hierarchical summing would look like for this. It's absolute
time interval measurement and I'm not sure whether summing up the
descendants' durations is the best way to go about it. ie. Should it be the
total duration any of the descendants are freezing or should it be sum of
the freezing durations of all descendants?

Thanks.

--
tejun