Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-18 Thread Peter Zijlstra
On Mon, Mar 18, 2019 at 02:21:52PM +, Patrick Bellasi wrote: > On 18-Mar 14:10, Peter Zijlstra wrote: > > On Mon, Mar 18, 2019 at 12:18:04PM +, Patrick Bellasi wrote: > > > On 13-Mar 21:18, Peter Zijlstra wrote: > > > > On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > > >

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-18 Thread Patrick Bellasi
On 18-Mar 14:10, Peter Zijlstra wrote: > On Mon, Mar 18, 2019 at 12:18:04PM +, Patrick Bellasi wrote: > > On 13-Mar 21:18, Peter Zijlstra wrote: > > > On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > > > > +static void uclamp_fork(struct task_struct *p) > > > > +{ > > > > +

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-18 Thread Peter Zijlstra
On Mon, Mar 18, 2019 at 12:18:04PM +, Patrick Bellasi wrote: > On 13-Mar 21:18, Peter Zijlstra wrote: > > On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > > > +static void uclamp_fork(struct task_struct *p) > > > +{ > > > + unsigned int clamp_id; > > > + > > > + if (unlikely(!

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-18 Thread Patrick Bellasi
On 13-Mar 21:18, Peter Zijlstra wrote: > On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > > +static void uclamp_fork(struct task_struct *p) > > +{ > > + unsigned int clamp_id; > > + > > + if (unlikely(!p->sched_class->uclamp_enabled)) > > + return; > > + > > + for

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-15 Thread Patrick Bellasi
On 13-Mar 21:10, Peter Zijlstra wrote: > On Wed, Mar 13, 2019 at 05:09:40PM +, Patrick Bellasi wrote: > > > Yes, that should be possible... will look into splitting this out in > > v8 to have something like: > > > > ---8<--- > > struct uclamp_req { > > /* Clamp value "requested" by a sche

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Peter Zijlstra
On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > +static void uclamp_fork(struct task_struct *p) > +{ > + unsigned int clamp_id; > + > + if (unlikely(!p->sched_class->uclamp_enabled)) > + return; > + > + for (clamp_id = 0; clamp_id < UCLAMP_CNT; ++clamp_id)

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Peter Zijlstra
On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > +int sysctl_sched_uclamp_handler(struct ctl_table *table, int write, > + void __user *buffer, size_t *lenp, > + loff_t *ppos) > +{ > + int old_min, old_max; > + int res

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Peter Zijlstra
On Wed, Mar 13, 2019 at 05:09:40PM +, Patrick Bellasi wrote: > Yes, that should be possible... will look into splitting this out in > v8 to have something like: > > ---8<--- > struct uclamp_req { > /* Clamp value "requested" by a scheduling entity */ > unsigned int value

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Peter Zijlstra
On Wed, Mar 13, 2019 at 05:09:40PM +, Patrick Bellasi wrote: > On 13-Mar 15:32, Peter Zijlstra wrote: > > I still think that this effective thing is backwards. > With respect to the previous v6, I've now moved this concept to the > patch where we actually use it for the first time. > The "ef

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Patrick Bellasi
On 13-Mar 15:32, Peter Zijlstra wrote: > On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > > > diff --git a/include/linux/sched.h b/include/linux/sched.h > > index 45460e7a3eee..447261cd23ba 100644 > > --- a/include/linux/sched.h > > +++ b/include/linux/sched.h > > @@ -584,14 +584

Re: [PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-03-13 Thread Peter Zijlstra
On Fri, Feb 08, 2019 at 10:05:42AM +, Patrick Bellasi wrote: > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 45460e7a3eee..447261cd23ba 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -584,14 +584,32 @@ struct sched_dl_entity { > * Utilization cla

[PATCH v7 03/15] sched/core: uclamp: Add system default clamps

2019-02-08 Thread Patrick Bellasi
Tasks without a user-defined clamp value are considered not clamped and by default their utilization can have any value in the [0..SCHED_CAPACITY_SCALE] range. Tasks with a user-defined clamp value are allowed to request any value in that range, and we unconditionally enforce the required clamps.