Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-16 Thread Patrick Bellasi
On 16-Aug 12:34, Dietmar Eggemann wrote: > On 08/13/2018 05:01 PM, Patrick Bellasi wrote: > >On 13-Aug 16:06, Vincent Guittot wrote: > >>On Mon, 13 Aug 2018 at 14:49, Patrick Bellasi > >>wrote: > >>>On 13-Aug 14:07, Vincent Guittot wrote: > On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi > >>

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-16 Thread Dietmar Eggemann
On 08/13/2018 05:01 PM, Patrick Bellasi wrote: On 13-Aug 16:06, Vincent Guittot wrote: On Mon, 13 Aug 2018 at 14:49, Patrick Bellasi wrote: On 13-Aug 14:07, Vincent Guittot wrote: On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi wrote: [...] Yes I agree that the current behavior is not comp

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Patrick Bellasi
On 13-Aug 16:06, Vincent Guittot wrote: > On Mon, 13 Aug 2018 at 14:49, Patrick Bellasi wrote: > > On 13-Aug 14:07, Vincent Guittot wrote: > > > On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi > > > wrote: [...] > > Yes I agree that the current behavior is not completely clean... still > > the q

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Vincent Guittot
On Mon, 13 Aug 2018 at 14:49, Patrick Bellasi wrote: > > On 13-Aug 14:07, Vincent Guittot wrote: > > On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi > > wrote: > > > > > > Hi Vincent! > > > > > > On 09-Aug 18:03, Vincent Guittot wrote: > > > > > On 07-Aug 15:26, Juri Lelli wrote: > > > > > > [...]

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Patrick Bellasi
On 13-Aug 14:07, Vincent Guittot wrote: > On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi wrote: > > > > Hi Vincent! > > > > On 09-Aug 18:03, Vincent Guittot wrote: > > > > On 07-Aug 15:26, Juri Lelli wrote: > > > > [...] > > > > > > > > + util_cfs = cpu_util_cfs(rq); > > > > > > + util_rt = cp

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Vincent Guittot
On Mon, 13 Aug 2018 at 14:07, Vincent Guittot wrote: > > On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi wrote: > > > > Hi Vincent! > > > > On 09-Aug 18:03, Vincent Guittot wrote: > > > > On 07-Aug 15:26, Juri Lelli wrote: > > > > [...] > > > > > > > > + util_cfs = cpu_util_cfs(rq); > > > > > > +

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Vincent Guittot
On Mon, 13 Aug 2018 at 12:12, Patrick Bellasi wrote: > > Hi Vincent! > > On 09-Aug 18:03, Vincent Guittot wrote: > > > On 07-Aug 15:26, Juri Lelli wrote: > > [...] > > > > > > + util_cfs = cpu_util_cfs(rq); > > > > > + util_rt = cpu_util_rt(rq); > > > > > + if (sched_feat(UCLAMP_SCHED_CLASS

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Juri Lelli
On 13/08/18 11:12, Patrick Bellasi wrote: > Hi Vincent! > > On 09-Aug 18:03, Vincent Guittot wrote: > > > On 07-Aug 15:26, Juri Lelli wrote: > > [...] > > > > > > + util_cfs = cpu_util_cfs(rq); > > > > > + util_rt = cpu_util_rt(rq); > > > > > + if (sched_feat(UCLAMP_SCHED_CLASS)) { > > >

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Patrick Bellasi
Hi Quentin! On 09-Aug 16:55, Quentin Perret wrote: > Hi Patrick, > > On Thursday 09 Aug 2018 at 16:41:56 (+0100), Patrick Bellasi wrote: > > > IIUC, not far below this you should still have something like: > > > > > > if (rt_rq_is_runnable(&rq->rt)) > > > return max; > > > > Do you

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Patrick Bellasi
Hi Vincent! On 09-Aug 18:03, Vincent Guittot wrote: > > On 07-Aug 15:26, Juri Lelli wrote: [...] > > > > + util_cfs = cpu_util_cfs(rq); > > > > + util_rt = cpu_util_rt(rq); > > > > + if (sched_feat(UCLAMP_SCHED_CLASS)) { > > > > + util = 0; > > > > + if (util_cfs) > >

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-09 Thread Vincent Guittot
Hi Patrick, On Thu, 9 Aug 2018 at 17:34, Patrick Bellasi wrote: > > On 07-Aug 15:26, Juri Lelli wrote: > > Hi, > > > > On 06/08/18 17:39, Patrick Bellasi wrote: > > > > [...] > > > > > @@ -223,13 +224,25 @@ static unsigned long sugov_get_util(struct > > > sugov_cpu *sg_cpu) > > > * utilizat

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-09 Thread Quentin Perret
Hi Patrick, On Thursday 09 Aug 2018 at 16:41:56 (+0100), Patrick Bellasi wrote: > > IIUC, not far below this you should still have something like: > > > > if (rt_rq_is_runnable(&rq->rt)) > > return max; > > Do you mean that when RT tasks are RUNNABLE we still want to got to > MAX

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-09 Thread Patrick Bellasi
On 07-Aug 14:54, Quentin Perret wrote: > Hi Patrick, Hi Quentin! > On Monday 06 Aug 2018 at 17:39:38 (+0100), Patrick Bellasi wrote: > > diff --git a/kernel/sched/cpufreq_schedutil.c > > b/kernel/sched/cpufreq_schedutil.c > > index a7affc729c25..bb25ef66c2d3 100644 > > --- a/kernel/sched/cpufreq

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-09 Thread Patrick Bellasi
On 07-Aug 15:26, Juri Lelli wrote: > Hi, > > On 06/08/18 17:39, Patrick Bellasi wrote: > > [...] > > > @@ -223,13 +224,25 @@ static unsigned long sugov_get_util(struct sugov_cpu > > *sg_cpu) > > * utilization (PELT windows are synchronized) we can directly add them > > * to obtain the

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-07 Thread Quentin Perret
Hi Patrick, On Monday 06 Aug 2018 at 17:39:38 (+0100), Patrick Bellasi wrote: > diff --git a/kernel/sched/cpufreq_schedutil.c > b/kernel/sched/cpufreq_schedutil.c > index a7affc729c25..bb25ef66c2d3 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -200,

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-07 Thread Juri Lelli
Hi, On 06/08/18 17:39, Patrick Bellasi wrote: [...] > @@ -223,13 +224,25 @@ static unsigned long sugov_get_util(struct sugov_cpu > *sg_cpu) >* utilization (PELT windows are synchronized) we can directly add them >* to obtain the CPU's actual utilization. >* > - * CF

[PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-06 Thread Patrick Bellasi
Currently schedutil enforces a maximum frequency when RT tasks are RUNNABLE. Such a mandatory policy can be made more tunable from userspace thus allowing for example to define a max frequency which is still reasonable for the execution of a specific RT workload. This will contribute to make the R