Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-04-01 Thread Patrick Bellasi
Hi Paul, On 30-Mar 14:15, Paul Turner wrote: > On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi > wrote: > > On 20-Mar 13:15, Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > >> > This patch extends the CPU

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-04-01 Thread Patrick Bellasi
Hi Paul, On 30-Mar 14:15, Paul Turner wrote: > On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi > wrote: > > On 20-Mar 13:15, Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > >> > This patch extends the CPU controller by adding a couple

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-30 Thread Paul Turner
On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi wrote: > On 20-Mar 13:15, Tejun Heo wrote: >> Hello, >> >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: >> > This patch extends the CPU controller by adding a couple of new >> > attributes, capacity_min

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-30 Thread Paul Turner
On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi wrote: > On 20-Mar 13:15, Tejun Heo wrote: >> Hello, >> >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: >> > This patch extends the CPU controller by adding a couple of new >> > attributes, capacity_min and capacity_max, which

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-30 Thread Paul Turner
There is one important, fundamental difference here: {cfs,rt}_{period,runtime}_us is a property that applies to a group of threads, it can be sub-divided. We can consume 100ms of quota either by having one thread run for 100ms, or 2 threads running for 50ms. This is not true for capacity. It's

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-30 Thread Paul Turner
There is one important, fundamental difference here: {cfs,rt}_{period,runtime}_us is a property that applies to a group of threads, it can be sub-divided. We can consume 100ms of quota either by having one thread run for 100ms, or 2 threads running for 50ms. This is not true for capacity. It's

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Tejun Heo
Hello, On Thu, Mar 23, 2017 at 11:37:50PM -0700, Joel Fernandes (Google) wrote: > > That's also why we're gonna have problem if we later decide we need a > > thread based API for it. Once we make cgroup the primary owner of the > > attribute, it's not straight forward to add another owner. > >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Tejun Heo
Hello, On Thu, Mar 23, 2017 at 11:37:50PM -0700, Joel Fernandes (Google) wrote: > > That's also why we're gonna have problem if we later decide we need a > > thread based API for it. Once we make cgroup the primary owner of the > > attribute, it's not straight forward to add another owner. > >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Patrick, On Thu, Mar 23, 2017 at 3:32 AM, Patrick Bellasi wrote: [..] >> > which can be used to defined tunable root constraints when CGroups are >> > not available, and becomes RO when CGroups are. >> > >> > Can this be eventually an acceptable option? >> > >> > In

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Patrick, On Thu, Mar 23, 2017 at 3:32 AM, Patrick Bellasi wrote: [..] >> > which can be used to defined tunable root constraints when CGroups are >> > not available, and becomes RO when CGroups are. >> > >> > Can this be eventually an acceptable option? >> > >> > In any case I think that this

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Tejun, >> That's also why the proposed interface has now been defined as a extension of >> the CPU controller in such a way to keep a consistent view. >> >> This controller is already used by run-times like Android to "scope" apps by >> constraining the amount of CPUs resource they are

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-24 Thread Joel Fernandes (Google)
Hi Tejun, >> That's also why the proposed interface has now been defined as a extension of >> the CPU controller in such a way to keep a consistent view. >> >> This controller is already used by run-times like Android to "scope" apps by >> constraining the amount of CPUs resource they are

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Tejun Heo
Hello, Patrick. On Thu, Mar 23, 2017 at 06:15:33PM +, Patrick Bellasi wrote: > What is important to notice is that there is a middleware, in between > the kernel and the applications. This is a special kind of user-space > where it is still safe for the kernel to delegate some "decisions". >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Tejun Heo
Hello, Patrick. On Thu, Mar 23, 2017 at 06:15:33PM +, Patrick Bellasi wrote: > What is important to notice is that there is a middleware, in between > the kernel and the applications. This is a special kind of user-space > where it is still safe for the kernel to delegate some "decisions". >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Patrick Bellasi
On 23-Mar 12:01, Tejun Heo wrote: > Hello, Hi Tejun, > On Thu, Mar 23, 2017 at 10:32:54AM +, 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

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Patrick Bellasi
On 23-Mar 12:01, Tejun Heo wrote: > Hello, Hi Tejun, > On Thu, Mar 23, 2017 at 10:32:54AM +, 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

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Tejun Heo
Hello, On Thu, Mar 23, 2017 at 10:32:54AM +, 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

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Tejun Heo
Hello, On Thu, Mar 23, 2017 at 10:32:54AM +, 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

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Patrick Bellasi
On 22-Mar 17:28, Joel Fernandes (Google) wrote: > Hi, > > On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi > wrote: > > On 20-Mar 13:15, Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > [..] > >> > These

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-23 Thread Patrick Bellasi
On 22-Mar 17:28, Joel Fernandes (Google) wrote: > Hi, > > On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi > wrote: > > On 20-Mar 13:15, Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > [..] > >> > These attributes: > >> > a) are tunable

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-22 Thread Joel Fernandes (Google)
Hi, On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi wrote: > On 20-Mar 13:15, Tejun Heo wrote: >> Hello, >> >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: [..] >> > These attributes: >> > a) are tunable at all hierarchy levels, i.e. root group too

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-22 Thread Joel Fernandes (Google)
Hi, On Mon, Mar 20, 2017 at 11:08 AM, Patrick Bellasi wrote: > On 20-Mar 13:15, Tejun Heo wrote: >> Hello, >> >> On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: [..] >> > These attributes: >> > a) are tunable at all hierarchy levels, i.e. root group too >> >> This usually is

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Tejun Heo
Hello, On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > This patch extends the CPU controller by adding a couple of new > attributes, capacity_min and capacity_max, which can be used to enforce > bandwidth boosting and capping. More specifically: > > - capacity_min: defines the

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Tejun Heo
Hello, On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > This patch extends the CPU controller by adding a couple of new > attributes, capacity_min and capacity_max, which can be used to enforce > bandwidth boosting and capping. More specifically: > > - capacity_min: defines the

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Patrick Bellasi
On 20-Mar 13:15, Tejun Heo wrote: > Hello, > > On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > > This patch extends the CPU controller by adding a couple of new > > attributes, capacity_min and capacity_max, which can be used to enforce > > bandwidth boosting and capping. More

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Patrick Bellasi
On 20-Mar 13:15, Tejun Heo wrote: > Hello, > > On Tue, Feb 28, 2017 at 02:38:38PM +, Patrick Bellasi wrote: > > This patch extends the CPU controller by adding a couple of new > > attributes, capacity_min and capacity_max, which can be used to enforce > > bandwidth boosting and capping. More

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Tejun Heo
On Mon, Mar 20, 2017 at 01:15:11PM -0400, Tejun Heo wrote: > > a) are tunable at all hierarchy levels, i.e. root group too > > This usually is problematic because there should be a non-cgroup way > of configuring the feature in case cgroup isn't configured or used, > and it becomes awkward to

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-20 Thread Tejun Heo
On Mon, Mar 20, 2017 at 01:15:11PM -0400, Tejun Heo wrote: > > a) are tunable at all hierarchy levels, i.e. root group too > > This usually is problematic because there should be a non-cgroup way > of configuring the feature in case cgroup isn't configured or used, > and it becomes awkward to

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 15-Mar 10:24, Paul E. McKenney wrote: > On Wed, Mar 15, 2017 at 04:44:39PM +, Patrick Bellasi wrote: > > On 15-Mar 09:10, Paul E. McKenney wrote: > > > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > > >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 15-Mar 10:24, Paul E. McKenney wrote: > On Wed, Mar 15, 2017 at 04:44:39PM +, Patrick Bellasi wrote: > > On 15-Mar 09:10, Paul E. McKenney wrote: > > > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > > > wrote: >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Paul E. McKenney
On Wed, Mar 15, 2017 at 04:44:39PM +, Patrick Bellasi wrote: > On 15-Mar 09:10, Paul E. McKenney wrote: > > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > > wrote: > > > > On 13-Mar 03:46,

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Paul E. McKenney
On Wed, Mar 15, 2017 at 04:44:39PM +, Patrick Bellasi wrote: > On 15-Mar 09:10, Paul E. McKenney wrote: > > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > > wrote: > > > > On 13-Mar 03:46, Joel Fernandes (Google)

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 15-Mar 09:10, Paul E. McKenney wrote: > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > wrote: > > > On 13-Mar 03:46, Joel Fernandes (Google) wrote: > > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 15-Mar 09:10, Paul E. McKenney wrote: > On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > > wrote: > > > On 13-Mar 03:46, Joel Fernandes (Google) wrote: > > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > > >> wrote: >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Paul E. McKenney
On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > wrote: > > On 13-Mar 03:46, Joel Fernandes (Google) wrote: > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > >> wrote: > >>

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Paul E. McKenney
On Wed, Mar 15, 2017 at 06:20:28AM -0700, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi > wrote: > > On 13-Mar 03:46, Joel Fernandes (Google) wrote: > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > >> wrote: > >> > The CPU CGroup controller allows to assign a

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Joel Fernandes
On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi wrote: > On 13-Mar 03:46, Joel Fernandes (Google) wrote: >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi >> wrote: >> > The CPU CGroup controller allows to assign a specified (maximum) >> >

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Joel Fernandes
On Wed, Mar 15, 2017 at 4:20 AM, Patrick Bellasi wrote: > On 13-Mar 03:46, Joel Fernandes (Google) wrote: >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi >> wrote: >> > The CPU CGroup controller allows to assign a specified (maximum) >> > bandwidth to tasks within a group, however it does

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 13-Mar 03:46, Joel Fernandes (Google) wrote: > On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > wrote: > > The CPU CGroup controller allows to assign a specified (maximum) > > bandwidth to tasks within a group, however it does not enforce any > > constraint on how

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-15 Thread Patrick Bellasi
On 13-Mar 03:46, Joel Fernandes (Google) wrote: > On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > wrote: > > The CPU CGroup controller allows to assign a specified (maximum) > > bandwidth to tasks within a group, however it does not enforce any > > constraint on how such bandwidth can be

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-13 Thread Joel Fernandes (Google)
On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi wrote: > The CPU CGroup controller allows to assign a specified (maximum) > bandwidth to tasks within a group, however it does not enforce any > constraint on how such bandwidth can be consumed. > With the integration of

Re: [RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-03-13 Thread Joel Fernandes (Google)
On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi wrote: > The CPU CGroup controller allows to assign a specified (maximum) > bandwidth to tasks within a group, however it does not enforce any > constraint on how such bandwidth can be consumed. > With the integration of schedutil, the scheduler

[RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-02-28 Thread Patrick Bellasi
The CPU CGroup controller allows to assign a specified (maximum) bandwidth to tasks within a group, however it does not enforce any constraint on how such bandwidth can be consumed. With the integration of schedutil, the scheduler has now the proper information about a task to select the most

[RFC v3 1/5] sched/core: add capacity constraints to CPU controller

2017-02-28 Thread Patrick Bellasi
The CPU CGroup controller allows to assign a specified (maximum) bandwidth to tasks within a group, however it does not enforce any constraint on how such bandwidth can be consumed. With the integration of schedutil, the scheduler has now the proper information about a task to select the most