Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 29, 2017 at 08:24:27AM -0700, Tejun Heo wrote:
> Hello, Peter.
> 
> On Tue, Aug 29, 2017 at 04:32:52PM +0200, Peter Zijlstra wrote:
> > So I mostly like. On accounting it only adds to the immediate cgroup (if
> > it has a parent, aka !root).
> > 
> > On update it does a DFS of all sub-groups and propagates the deltas up
> > to the requested group.
> ...
> > What I don't get is why you need cgroup_cpu_stat_updated(). That is, I
> > see you use it to keep the keep the DFS 'stack' up-to-date, but what I
> > don't see is why you'd need that.
> 
> That is to make reading stats O(number of descendants which have been
> active since last read) instad of O(number of all descendants) as
> there can be a lot of not-too-active cgroups in a system.  Stat
> reading can be frequent, so the combination can get really bad.  By
> keeping the updated list separate, increasing read frequency decreases
> the cost of each read.

Hmm, and when its never read, we only do the O(depth) thing _once_,
right?
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux