Re: [Documentation] State of CPU controller in cgroup v2
From: Mike Galbraith
Date: Mon Aug 22 2016 - 06:12:56 EST
On Sat, 2016-08-20 at 11:56 -0400, Tejun Heo wrote:
> > > there are other reasons to enforce process granularity. One
> > > important one is isolating system-level management operations from
> > > in-process application operations. The cgroup interface, being a
> > > virtual filesystem, is very unfit for multiple independent
> > > operations taking place at the same time as most operations have to
> > > be multi-step and there is no way to synchronize multiple accessors.
> > > See also [5] Documentation/cgroup-v2.txt, "R-2. Thread Granularity"
> >
> > I don't buy this argument at all. System-level code is likely to
> > assign single process *trees*, which are a different beast entirely.
> > I.e. you fork, move the child into a cgroup, and that child and its
> > children stay in that cgroup. I don't see how the thread/process
> > distinction matters.
>
> Good point on the multi-process issue, this is something which nagged
> me a bit while working on rgroup, although I have to point out that
> the issue here is one of not going far enough rather than the approach
> being wrong. There are limitations to scoping it to individual
> processes but that doesn't negate the underlying problem or the
> usefulness of in-process control.
>
> For system-level and process-level operations to not step on each
> other's toes, they need to agree on the granularity boundary -
> system-level should be able to treat an application hierarchy as a
> single unit. A possible solution is allowing rgroup hirearchies to
> span across process boundaries and implementing cgroup migration
> operations which treat such hierarchies as a single unit. I'm not yet
> sure whether the boundary should be at program groups or rgroups.
Why is it not viable to predicate contentious lowest common denominator
restrictions upon the set of enabled controllers? If only thread
granularity controllers are enabled, from that point onward, v2
restrictions cease to make any sense, thus could be lifted, leaving
nobody cast adrift in a leaky v1 lifeboat when v2 sets sail. Or?
-Mike