[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170323160112.GA5953@htj.duckdns.org>
Date: Thu, 23 Mar 2017 12:01:12 -0400
From: Tejun Heo <tj@...nel.org>
To: Patrick Bellasi <patrick.bellasi@....com>
Cc: "Joel Fernandes (Google)" <joel.opensrc@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-pm@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU
controller
Hello,
On Thu, Mar 23, 2017 at 10:32:54AM +0000, Patrick Bellasi wrote:
> > But then we would lose out on being able to attach capacity
> > constraints to specific tasks or groups of tasks?
>
> Yes, right. If CGroups are not available than you cannot specify
> per-task constraints. This is just a system-wide global tunable.
>
> Question is: does this overall proposal makes sense outside the scope
> of task groups classification? (more on that afterwards)
I think it does, given that it's a per-thread property which requires
internal application knowledge to tune.
> > I think the concern raised is more about whether CGroups is the right
> > interface to use for attaching capacity constraints to task or groups
> > of tasks, or is there a better way to attach such constraints?
>
> Notice that CGroups based classification allows to easily enforce
> the concept of "delegation containment". I think this feature should
> be nice to have whatever interface we choose.
>
> However, potentially we can define a proper per-task API; are you
> thinking to something specifically?
I don't think the overall outcome was too good when we used cgroup as
the direct way of configuring certain attributes - it either excludes
the possibility of easily accessible API from application side or
conflicts with the attributes set through such API. It's a lot
clearer when cgroup just sets what's allowed under the hierarchy.
This is also in line with the aspect that cgroup for the most part is
a scoping mechanism - it's the most straight-forward to implement and
use when the behavior inside cgroup matches a system without cgroup,
just scoped. It shows up here too. If you take out the cgroup part,
you're left with an interface which is hardly useful. cgroup isn't
scoping the global system here. It's becoming the primary interface
for this feature which most likely isn't a good sign.
So, my suggestion is to implement it as a per-task API. If the
feature calls for scoped restrictions, we definitely can add cgroup
support for that but I'm really not convinced about using cgroup as
the primary interface for this.
Thanks.
--
tejun
Powered by blists - more mailing lists