Re: [PATCH 2/2] sched/deadline: Don't return invalid cpu in cpudl_maximum_cpu()

2017-06-08 Thread Juri Lelli
On 07/06/17 09:14, Byungchul Park wrote: > On Wed, Jun 07, 2017 at 08:42:24AM +0900, Byungchul Park wrote: > > On Tue, Jun 06, 2017 at 04:12:25PM +0100, Juri Lelli wrote: > > > Hi, > > > > > > On 02/06/17 16:31, Byungchul Park wrote: [...] > > > >

Re: [PATCH 2/2] sched/deadline: Don't return invalid cpu in cpudl_maximum_cpu()

2017-06-06 Thread Juri Lelli
Hi, On 02/06/17 16:31, Byungchul Park wrote: > When the heap tree is empty, cp->elements[0].cpu has meaningless value. > We need to consider the case. > > Signed-off-by: Byungchul Park > --- > kernel/sched/cpudeadline.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant load-tracking support

2017-06-15 Thread Juri Lelli
Hi, On 14/06/17 15:08, Vincent Guittot wrote: > On 14 June 2017 at 09:55, Dietmar Eggemann wrote: > > > > On 06/12/2017 04:27 PM, Vincent Guittot wrote: > > > On 8 June 2017 at 09:55, Dietmar Eggemann > > > wrote: > > > > Hi Vincent, > > > >

Re: [PATCH 2/2] sched/deadline: Don't return invalid cpu in cpudl_maximum_cpu()

2017-06-09 Thread Juri Lelli
On 09/06/17 11:43, Byungchul Park wrote: > On Thu, Jun 08, 2017 at 03:02:43PM +0100, Juri Lelli wrote: > > On 07/06/17 09:14, Byungchul Park wrote: > > > On Wed, Jun 07, 2017 at 08:42:24AM +0900, Byungchul Park wrote: > > > > On Tue, Jun 06, 2017 at 04:12:25PM +0100,

Re: [PATCH] sched/cpufreq_schedutil: use now as reference when aggregating shared policy requests

2017-05-04 Thread Juri Lelli
Hi Rafael, On 04/05/17 16:29, Rafael J. Wysocki wrote: > On Wednesday, May 03, 2017 02:30:48 PM Juri Lelli wrote: > > Currently, sugov_next_freq_shared() uses last_freq_update_time as a > > reference to decide when to start considering CPU contributions as > > stale. &g

Re: [PATCH v9 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-22 Thread Juri Lelli
er choice, since cpu3 is a (SMT) thread of an already loaded core. > + * of cpu3 that is fully loaded. > + * > + * We have to do the best if possible, but choose the second > + * best here since that is too expensive to adopt. > + */ I'd also modify this last paragraph with something like: "Doing it 'right' is difficult and expensive. The current solution is an acceptable approximation." Apart from these minor points, patch looks ok to me. Acked-by: Juri Lelli <juri.le...@arm.com> Best, - Juri

Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-22 Thread Juri Lelli
Hi, On 22/08/17 14:53, Byungchul Park wrote: > On Mon, Aug 21, 2017 at 02:44:58PM +0100, Juri Lelli wrote: > > Hi, > > On 18/08/17 17:21, Byungchul Park wrote: > > > It would be better to try to check other siblings first if > > > SD_PREFER_SIBLING is flag

Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-21 Thread Juri Lelli
Hi, On 18/08/17 17:21, Byungchul Park wrote: > It would be better to try to check other siblings first if > SD_PREFER_SIBLING is flaged when pushing tasks - migration. > > Signed-off-by: Byungchul Park Mmm, this looks like Peter's proposed patch, maybe add (at least) a

Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-21 Thread Juri Lelli
On 21/08/17 15:56, Peter Zijlstra wrote: > On Mon, Aug 21, 2017 at 02:44:58PM +0100, Juri Lelli wrote: > > > Also, I'm not sure what Peter meant with > > > > "But still this isn't quite right, because when we consider this for SMT > > (as was the intent here)

Re: [PATCH 0/7] sched/deadline: fix cpusets bandwidth accounting

2017-08-24 Thread Juri Lelli
Hi, On 24/08/17 09:53, Luca Abeni wrote: > On Wed, 23 Aug 2017 13:47:13 -0600 > Mathieu Poirier wrote: > > >> This is a renewed attempt at fixing a problem reported by Steve Rostedt > > >> [1] > > >> where DL bandwidth accounting is not recomputed after CPUset and >

Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

2017-11-30 Thread Juri Lelli
On 30/11/17 15:41, Patrick Bellasi wrote: > On 30-Nov 14:12, Juri Lelli wrote: > > Hi, > > > > On 30/11/17 11:47, Patrick Bellasi wrote: > > > > [...] > > > > > diff --git a/kernel/sched/cpufreq_schedutil.c > > > b/kernel/sched/cpufreq_

Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

2017-11-30 Thread Juri Lelli
On 30/11/17 16:19, Patrick Bellasi wrote: > On 30-Nov 17:02, Juri Lelli wrote: > > On 30/11/17 15:41, Patrick Bellasi wrote: > > > On 30-Nov 14:12, Juri Lelli wrote: > > > > Hi, > > > > > > > > On 30/11/17 11:47, Patrick Bellasi wrote: > &g

Re: [PATCH v3 2/6] cpufreq: schedutil: ensure max frequency while running RT/DL tasks

2017-11-30 Thread Juri Lelli
On 30/11/17 15:45, Patrick Bellasi wrote: > On 30-Nov 14:17, Juri Lelli wrote: > > Hi, > > > > On 30/11/17 11:47, Patrick Bellasi wrote: > > > > [...] > > > > > @@ -340,6 +349,7 @@ static void sugov_update_shared(struct > > > upda

Re: [PATCH v3 5/6] cpufreq: schedutil: relax rate-limiting while running RT/DL tasks

2017-11-30 Thread Juri Lelli
On 30/11/17 15:54, Patrick Bellasi wrote: > On 30-Nov 14:36, Juri Lelli wrote: [...] > > I wonder if we would also need some way to trigger a back to back update > > as soon as a currently running one finishes and an RT/DL task asked for > > an update (without wait

Re: [PATCH v3 6/6] cpufreq: schedutil: ignore sugov kthreads

2017-11-30 Thread Juri Lelli
On 30/11/17 16:02, Patrick Bellasi wrote: > On 30-Nov 14:41, Juri Lelli wrote: [...] > > If the DL changes (which I shall post again as soon as tip/sched/core is > > bumped up to 4.15-rc1) get in first, this is going to be useless (as the > > DL kthread gets ignored by

Re: [PATCH v3 5/6] cpufreq: schedutil: relax rate-limiting while running RT/DL tasks

2017-11-30 Thread Juri Lelli
sugov_cpu_is_busy(sg_cpu); > + > if (rt_mode) { > next_f = policy->cpuinfo.max_freq; > } else { > @@ -379,7 +384,7 @@ static void sugov_update_shared(struct update_util_data > *hook, u64 time, > sugov_set_iowait_boost(sg_cpu, time, flags); > sg_cpu->l

Re: [PATCH v3 6/6] cpufreq: schedutil: ignore sugov kthreads

2017-11-30 Thread Juri Lelli
t; + return; > + > raw_spin_lock(_policy->update_lock); > > sugov_get_util(, , sg_cpu->cpu); If the DL changes (which I shall post again as soon as tip/sched/core is bumped up to 4.15-rc1) get in first, this is going to be useless (as the DL kthread gets ignored by the scheduling class itself). But, this looks good to me "in the meantime". Reviewed-by: Juri Lelli <juri.le...@redhat.com> Best, Juri

Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

2017-11-30 Thread Juri Lelli
Hi, On 30/11/17 11:47, Patrick Bellasi wrote: [...] > diff --git a/kernel/sched/cpufreq_schedutil.c > b/kernel/sched/cpufreq_schedutil.c > index 2f52ec0f1539..67339ccb5595 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -347,6 +347,12 @@ static

Re: [PATCH v3 2/6] cpufreq: schedutil: ensure max frequency while running RT/DL tasks

2017-11-30 Thread Juri Lelli
Hi, On 30/11/17 11:47, Patrick Bellasi wrote: [...] > @@ -340,6 +349,7 @@ static void sugov_update_shared(struct update_util_data > *hook, u64 time, > struct sugov_policy *sg_policy = sg_cpu->sg_policy; > unsigned long util, max; > unsigned int next_f; > + bool rt_mode; >

Re: [PATCH v3 3/6] cpufreq: schedutil: update CFS util only if used

2017-11-30 Thread Juri Lelli
ode; > > - sugov_get_util(, , sg_cpu->cpu); > - > raw_spin_lock(_policy->update_lock); > > + sugov_get_util(, , sg_cpu->cpu); > sg_cpu->util = util; > sg_cpu->max = max; Patch looks good. Reviewed-by: Juri Lelli <juri.le...@redhat.

Re: [PATCH v3 4/6] sched/rt: fast switch to maximum frequency when RT tasks are scheduled

2017-11-30 Thread Juri Lelli
PU > - when we actually pick a RT task for execution > - at each tick time > - when a task is set to be RT > > Signed-off-by: Patrick Bellasi <patrick.bell...@arm.com> > Reviewed-by: Dietmar Eggemann <dietmar.eggem...@arm.com> Reviewed-by: Juri Lelli <juri.le...@redhat.com> Best, Juri

Re: [PATCH 2/4] sched: cpufreq: Keep track of cpufreq utilization update flags

2017-12-13 Thread Juri Lelli
ine SCHED_CPUFREQ_IOWAIT (1U << 2) > +#define SCHED_CPUFREQ_CFS(1U << 2) This flag doesn't do much, does it? I mean RT/DL/IOWAIT are used to bump up frequency, while you are adding CFS for the sake of simmetry, right? And with my patches DL will hopefully soon be in the same sit

Re: [PATCH 4/4] cpufreq: schedutil: Don't call sugov_get_util() unnecessarily

2017-12-13 Thread Juri Lelli
Hi, On 13/12/17 15:23, Viresh Kumar wrote: > sugov_update_shared() may get called to clear the scheduling class flags > and we would return immediately in that case. Calling sugov_get_util() > in that case isn't going to be of any use then. Move invocation of > sugov_get_util() after the clear

Re: [PATCH 3/4] cpufreq: schedutil: Don't pass flags to sugov_set_iowait_boost()

2017-12-13 Thread Juri Lelli
Hi, On 13/12/17 15:23, Viresh Kumar wrote: > We are already passing sg_cpu as argument to sugov_set_iowait_boost() > helper and the same can be used to retrieve the flags value. Get rid of > the redundant argument. > > Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org&g

Re: [PATCH 1/4] cpufreq: schedutil: Initialize sg_cpu->flags to 0

2017-12-13 Thread Juri Lelli
t; flags anyway. > > Initialize it to 0. > > Change-Id: I028dbb40c5c242cff52fe1b14aeaff37f29a2f8d Without ^ > Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org> Reviewed-by: Juri Lelli <juri.le...@redhat.com> Best, - Juri

[ANNOUNCE][CFP] Power Management and Scheduling in the Linux Kernel II edition (OSPM-summit 2018)

2017-11-15 Thread Juri Lelli
/presentations will be sent out on 23rd of December 2017. .:: ORGANISERS (in alphabetical order) Luca Abeni (SSSA) Patrick Bellasi (Arm) Tommaso Cucinotta (SSSA) Dietmar Eggemann (Arm) Sudeep Holla (Arm) Juri Lelli (Red Hat) Lorenzo Pieralisi (Arm) Morten Rasmussen (Arm) Claudio Scordino (Evidence SRL)

Re: [RFC PATCH v2 1/8] sched/cpufreq_schedutil: make use of DEADLINE utilization signal

2017-12-05 Thread Juri Lelli
On 05/12/17 16:34, Patrick Bellasi wrote: > On 05-Dec 16:24, Juri Lelli wrote: > > On 05/12/17 15:09, Patrick Bellasi wrote: > > > > + /* > > > > +* Ideally we would like to set util_dl as min/guaranteed freq > > > > and > >

Re: [PATCH] sched/rt: Do not pull from current CPU if only one cpu to pull

2017-12-04 Thread Juri Lelli
On 04/12/17 03:09, Steven Rostedt wrote: > On Mon, 4 Dec 2017 08:45:17 +0100 > Juri Lelli <juri.le...@redhat.com> wrote: > > > Right. I was wondering however if for the truly UP case we shouldn't be > > initiating/queueing callbacks (pull/push) at all? > > If !

[RFC PATCH v2 8/8] sched/deadline: make bandwidth enforcement scale-invariant

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> Apply frequency and cpu scale-invariance correction factor to bandwidth enforcement (similar to what we already do to fair utilization tracking). Each delta_exec gets scaled considering current frequency and maximum cpu capacity; which

[RFC PATCH v2 4/8] sched/cpufreq_schedutil: split utilization signals

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> To be able to treat utilization signals of different scheduling classes in different ways (e.g., CFS signal might be stale while DEADLINE signal is never stale by design) we need to split sugov_cpu::util signal in two: util_cfs and util_dl. This patc

[RFC PATCH v2 7/8] sched/sched.h: move arch_scale_{freq,cpu}_capacity outside CONFIG_SMP

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> Currently, frequency and cpu capacity scaling is only performed on CONFIG_SMP systems (as CFS PELT signals are only present for such systems). However, other scheduling classes want to do freq/cpu scaling, and for !CONFIG_SMP configurations a

[RFC PATCH v2 6/8] sched/sched.h: remove sd arch_scale_freq_capacity parameter

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> sd parameter is never used in arch_scale_freq_capacity (and it's hard to see where information coming from scheduling domains might help doing frequency invariance scaling). Remove it; also in anticipation of moving arch_scale_freq_capacity o

[RFC PATCH v2 5/8] sched/cpufreq_schedutil: always consider all CPUs when deciding next freq

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> No assumption can be made upon the rate at which frequency updates get triggered, as there are scheduling policies (like SCHED_DEADLINE) which don't trigger them so frequently. Remove such assumption from the code, by always considering SCHED_DE

[RFC PATCH v2 0/8] SCHED_DEADLINE freq/cpu invariance and OPP selection

2017-12-04 Thread Juri Lelli
. Scordino, G. Lipari, A Resource Reservation Algorithm for Power-Aware Scheduling of Periodic and Aperiodic Real-Time Tasks, IEEE Transactions on Computers, December 2006 Juri Lelli (8): sched/cpufreq_schedutil: make use of DEADLINE utilization signal sched/deadline: move cpu frequency

[RFC PATCH v2 2/8] sched/deadline: move cpu frequency selection triggering points

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> Since SCHED_DEADLINE doesn't track utilization signal (but reserves a fraction of CPU bandwidth to tasks admitted to the system), there is no point in evaluating frequency changes during each tick event. Move frequency selection triggering points to

[RFC PATCH v2 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> Worker kthread needs to be able to change frequency for all other threads. Make it special, just under STOP class. Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Ingo Molnar <mi...@ker

[RFC PATCH v2 1/8] sched/cpufreq_schedutil: make use of DEADLINE utilization signal

2017-12-04 Thread Juri Lelli
From: Juri Lelli <juri.le...@arm.com> SCHED_DEADLINE tracks active utilization signal with a per dl_rq variable named running_bw. Make use of that to drive cpu frequency selection: add up FAIR and DEADLINE contribution to get the required CPU capacity to handle both requirements (while RT

Re: [PATCH] sched/rt: Do not pull from current CPU if only one cpu to pull

2017-12-03 Thread Juri Lelli
Hi Steve, On 02/12/17 13:04, Steven Rostedt wrote: > Daniel Wagner reported a crash on the beaglebone black. This is a > single CPU architecture, and does not have a functional: > arch_send_call_function_single_ipi() and can crash if that is called. > > As it only has one CPU, it shouldn't be

Re: [RFC PATCH v2 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-12-05 Thread Juri Lelli
Hi, On 05/12/17 11:55, Patrick Bellasi wrote: > Hi Juri, > > On 04-Dec 11:23, Juri Lelli wrote: > [...] > > > diff --git a/kernel/sched/cpufreq_schedutil.c > > b/kernel/sched/cpufreq_schedutil.c > > index de1ad1fffbdc..c22457868ee6 100644 > > --- a/ker

Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

2017-12-12 Thread Juri Lelli
On 12/12/17 20:10, Viresh Kumar wrote: > On 12-12-17, 14:38, Juri Lelli wrote: > > Hi Viresh, > > > > On 12/12/17 17:07, Viresh Kumar wrote: > > > > [...] > > > > > From: Viresh Kumar <viresh.ku...@linaro.org> > > > Date: Tue, 12 D

Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

2017-12-12 Thread Juri Lelli
Hi Viresh, On 12/12/17 17:07, Viresh Kumar wrote: [...] > From: Viresh Kumar > Date: Tue, 12 Dec 2017 15:43:26 +0530 > Subject: [PATCH] sched: Keep track of cpufreq utilization update flags > > Currently the schedutil governor overwrites the sg_cpu->flags field on >

Re: [RFC PATCH v2 1/8] sched/cpufreq_schedutil: make use of DEADLINE utilization signal

2017-12-05 Thread Juri Lelli
Hi, On 05/12/17 15:09, Patrick Bellasi wrote: > Hi Juri, > [...] > > static void sugov_get_util(unsigned long *util, unsigned long *max, int > > cpu) > > { > > struct rq *rq = cpu_rq(cpu); > > - unsigned long cfs_max; > > + unsigned long dl_util = (rq->dl.running_bw *

Re: [RFC PATCH v2 4/8] sched/cpufreq_schedutil: split utilization signals

2017-12-05 Thread Juri Lelli
Hi, On 05/12/17 15:17, Patrick Bellasi wrote: > Hi Juri, > > On 04-Dec 11:23, Juri Lelli wrote: > > From: Juri Lelli <juri.le...@arm.com> > > > > To be able to treat utilization signals of different scheduling classes > > in different ways (e.g., CFS sign

Re: [PATCH 2/4] sched: cpufreq: Keep track of cpufreq utilization update flags

2017-12-20 Thread Juri Lelli
On 20/12/17 15:47, Rafael J. Wysocki wrote: > On Wednesday, December 20, 2017 2:28:26 PM CET Peter Zijlstra wrote: > > On Wed, Dec 20, 2017 at 12:55:46PM +, Patrick Bellasi wrote: > > > On 20-Dec 09:31, Peter Zijlstra wrote: > > > > > > Didn't juri have patches to make DL do something sane?

Re: [RFC PATCH] sched/cpufreq/schedutil: handling urgent frequency requests

2018-05-09 Thread Juri Lelli
On 09/05/18 10:05, Rafael J. Wysocki wrote: > On Wed, May 9, 2018 at 9:01 AM, Joel Fernandes <j...@joelfernandes.org> wrote: > > On Wed, May 09, 2018 at 12:24:49PM +0530, Viresh Kumar wrote: > >> On 09-05-18, 08:45, Juri Lelli wrote: > >> > On 08/05/18 21:54

[PATCH] kernel/sched/cpufreq_schedutil: remove stale comment

2018-05-09 Thread Juri Lelli
ning it. Signed-off-by: Juri Lelli <juri.le...@redhat.com> Cc: Ingo Molnar <mi...@redhat.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: "Rafael J. Wysocki" <rafael.j.wyso...@intel.com> Cc: Viresh Kumar <viresh.ku...@linaro.org> Cc: Claudio Scordino <clau

Re: [RFC PATCH] sched/cpufreq/schedutil: handling urgent frequency requests

2018-05-09 Thread Juri Lelli
On 09/05/18 10:25, Rafael J. Wysocki wrote: > On Wed, May 9, 2018 at 10:23 AM, Juri Lelli <juri.le...@redhat.com> wrote: > > On 09/05/18 10:05, Rafael J. Wysocki wrote: > >> On Wed, May 9, 2018 at 9:01 AM, Joel Fernandes <j...@joelfernandes.org> > >> wrot

Re: [RFC PATCH] sched/cpufreq/schedutil: handling urgent frequency requests

2018-05-09 Thread Juri Lelli
On 08/05/18 21:54, Joel Fernandes wrote: [...] > Just for discussion sake, is there any need for work_in_progress? If we can > queue multiple work say kthread_queue_work can handle it, then just queuing > works whenever they are available should be Ok and the kthread loop can > handle them.

Re: [PATCH] Revert "cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily"

2018-05-08 Thread Juri Lelli
On 08/05/18 16:23, Viresh Kumar wrote: > On 08-05-18, 12:36, Dietmar Eggemann wrote: > > That's true but where is the benefit by doing so? (Multiple) per-cluster or > > per-cpu frequency domains, why should the sugov kthread run on a foreign > > cpu? > > I am not sure I know the answer, but I

Re: [PATCH] Revert "cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily"

2018-05-08 Thread Juri Lelli
On 08/05/18 12:24, Quentin Perret wrote: > On Tuesday 08 May 2018 at 16:44:51 (+0530), Viresh Kumar wrote: > > On 08-05-18, 12:00, Quentin Perret wrote: > > > Right, I see your point. Now, with the current implementation, why should > > > we randomly force a CPU to manage the kthread of another ?

[PATCH] Documentation/admin-guide/pm/intel_pstate: fix Active Mode w/o HWP paragraph

2018-05-08 Thread Juri Lelli
P-state selection algorithm (powersave or performance) is selected by echoing the desired choice to scaling_governor sysfs attribute and not to scaling_cur_freq (as currently stated). Fix it. Signed-off-by: Juri Lelli <juri.le...@redhat.com> Cc: Jonathan Corbet <cor...@lwn.net> C

Re: [PATCH RFC] schedutil: Allow cpufreq requests to be made even when kthread kicked

2018-05-17 Thread Juri Lelli
Hi Joel, On 16/05/18 15:45, Joel Fernandes (Google) wrote: [...] > @@ -382,13 +391,24 @@ sugov_update_shared(struct update_util_data *hook, u64 > time, unsigned int flags) > static void sugov_work(struct kthread_work *work) > { > struct sugov_policy *sg_policy = container_of(work,

Re: [RFC/RFT] [PATCH 00/10] Intel_pstate: HWP Dynamic performance boost

2018-05-16 Thread Juri Lelli
Hi Srinivas, On 15/05/18 21:49, Srinivas Pandruvada wrote: [...] > > Peter Zijlstra (1): > x86,sched: Add support for frequency invariance Cool! I was going to ask Peter about this patch. You beat me to it. :) I'll have a lokk at the set. BTW, just noticed that you Cc-ed me using my old

Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting

2018-05-17 Thread Juri Lelli
On 16/05/18 18:31, Juri Lelli wrote: > On 16/05/18 17:47, Peter Zijlstra wrote: > > On Wed, May 16, 2018 at 05:19:25PM +0200, Juri Lelli wrote: > > > > > Anyway, FWIW I started testing this on a E5-2609 v3 and I'm not seeing > > > hackbench regressions so far

Re: [PATCH RFC] schedutil: Allow cpufreq requests to be made even when kthread kicked

2018-05-17 Thread Juri Lelli
On 17/05/18 15:50, Viresh Kumar wrote: > On 17-05-18, 09:00, Juri Lelli wrote: > > Hi Joel, > > > > On 16/05/18 15:45, Joel Fernandes (Google) wrote: > > > > [...] > > > > > @@ -382,13 +391,24 @@ sugov_update_shared(struct update_util

Re: [PATCH RFC] schedutil: Allow cpufreq requests to be made even when kthread kicked

2018-05-17 Thread Juri Lelli
On 17/05/18 07:43, Joel Fernandes wrote: > On Thu, May 17, 2018 at 04:28:23PM +0200, Juri Lelli wrote: > [...] > > > > > We would need more locking stuff in the work handler in that case and > > > > > I think there maybe a chance of missing the request in th

Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting

2018-05-17 Thread Juri Lelli
On 17/05/18 12:59, Juri Lelli wrote: > On 16/05/18 18:31, Juri Lelli wrote: > > On 16/05/18 17:47, Peter Zijlstra wrote: > > > On Wed, May 16, 2018 at 05:19:25PM +0200, Juri Lelli wrote: > > > > > > > Anyway, FWIW I started testing this on a E5-2609

Re: [PATCH RFC] schedutil: Allow cpufreq requests to be made even when kthread kicked

2018-05-17 Thread Juri Lelli
On 17/05/18 06:07, Joel Fernandes wrote: > On Thu, May 17, 2018 at 12:53:58PM +0200, Juri Lelli wrote: > > On 17/05/18 15:50, Viresh Kumar wrote: > > > On 17-05-18, 09:00, Juri Lelli wrote: > > > > Hi Joel, > > > > > > >

Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting

2018-05-16 Thread Juri Lelli
On 15/05/18 21:49, Srinivas Pandruvada wrote: > intel_pstate has two operating modes: active and passive. In "active" > mode, the in-built scaling governor is used and in "passive" mode, > the driver can be used with any governor like "schedutil". In "active" > mode the utilization values from

Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting

2018-05-16 Thread Juri Lelli
On 16/05/18 17:47, Peter Zijlstra wrote: > On Wed, May 16, 2018 at 05:19:25PM +0200, Juri Lelli wrote: > > > Anyway, FWIW I started testing this on a E5-2609 v3 and I'm not seeing > > hackbench regressions so far (running with schedutil governor). > > https://en.wik

Re: [PATCH v2] schedutil: Allow cpufreq requests to be made even when kthread kicked

2018-05-21 Thread Juri Lelli
isn't an RFC anymore, you shouldn't have added below > > paragraph here. It could go to the comments section though. > > > >> I had brought up this issue at the OSPM conference and Claudio had a > >> discussion RFC with an alternate approach [1]. I prefer the approach as > >

Re: [PATCH v8 6/6] cpuset: Allow reporting of sched domain generation info

2018-05-22 Thread Juri Lelli
Hi, On 17/05/18 16:55, Waiman Long wrote: > This patch enables us to report sched domain generation information. > > If DYNAMIC_DEBUG is enabled, issuing the following command > > echo "file cpuset.c +p" > /sys/kernel/debug/dynamic_debug/control > > and setting loglevel to 8 will allow the

Re: [PATCH v8 2/6] cpuset: Add new v2 cpuset.sched.domain flag

2018-05-22 Thread Juri Lelli
Hi, On 17/05/18 16:55, Waiman Long wrote: [...] > /** > + * update_isolated_cpumask - update the isolated_cpus mask of parent cpuset > + * @cpuset: The cpuset that requests CPU isolation > + * @oldmask: The old isolated cpumask to be removed from the parent > + * @newmask: The new isolated

Re: [PATCH RFC] schedutil: Address the r/w ordering race in kthread

2018-05-23 Thread Juri Lelli
jlstra <pet...@infradead.org> > CC: Ingo Molnar <mi...@redhat.com> > CC: Patrick Bellasi <patrick.bell...@arm.com> > CC: Juri Lelli <juri.le...@redhat.com> > Cc: Luca Abeni <luca.ab...@santannapisa.it> > CC: Todd Kjos <tk...@google.com> > CC: clau...@ev

Re: [PATCH] cpufreq: schedutil: Avoid missing updates for one-CPU policies

2018-05-23 Thread Juri Lelli
el.com> I don't have a platform at hand where to test this. But, it looks OK to me. Reviewed-by: Juri Lelli <juri.le...@redhat.com> Best, - Juri

Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-24 Thread Juri Lelli
On 17/05/18 16:55, Waiman Long wrote: [...] > @@ -849,7 +860,12 @@ static void rebuild_sched_domains_locked(void) >* passing doms with offlined cpu to partition_sched_domains(). >* Anyways, hotplug work item will rebuild sched domains. >*/ > - if

Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-24 Thread Juri Lelli
On 24/05/18 10:04, Patrick Bellasi wrote: [...] > From 84bb8137ce79f74849d97e30871cf67d06d8d682 Mon Sep 17 00:00:00 2001 > From: Patrick Bellasi > Date: Wed, 23 May 2018 16:33:06 +0100 > Subject: [PATCH 1/1] cgroup/cpuset: disable sched domain rebuild when not >

Re: [PATCH] kernel/sched/topology: Clarify root domain(s) debug string

2018-05-25 Thread Juri Lelli
On 25/05/18 13:35, Dietmar Eggemann wrote: [...] > > Looks good to me. Probably especially helpful when setting up exclusive > cpusets. > > Juno with big and little exclusive cpuset: > > ... > [ 124.231333] CPU1 attaching sched-domain(s): > [ 124.235482] domain-0: span=1-2 level=MC > [

Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-25 Thread Juri Lelli
On 25/05/18 11:31, Patrick Bellasi wrote: [...] > Right, so the problem seems to be that we "need" to call > arch_update_cpu_topology() and we do that by calling > partition_sched_domains() which was initially introduced by: > >029190c515f1 ("cpuset sched_load_balance flag") > > back in

Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-24 Thread Juri Lelli
On 17/05/18 16:55, Waiman Long wrote: [...] > + A parent cgroup cannot distribute all its CPUs to child > + scheduling domain cgroups unless its load balancing flag is > + turned off. > + > + cpuset.sched.load_balance > + A read-write single value file which exists on non-root >

[PATCH] kernel/sched/topology: Clarify root domain(s) debug string

2018-05-24 Thread Juri Lelli
span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 } CPU1 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 } [...] root domain span: 0-5 (max cpu_capacity = 1024) Signed-off-by:

Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-24 Thread Juri Lelli
On 24/05/18 11:09, Waiman Long wrote: > On 05/24/2018 10:36 AM, Juri Lelli wrote: > > On 17/05/18 16:55, Waiman Long wrote: > > > > [...] > > > >> + A parent cgroup cannot distribute all its CPUs to child > >> + scheduling domain cgroups unless

Re: [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework

2018-06-07 Thread Juri Lelli
On 21/05/18 15:24, Quentin Perret wrote: > Several subsystems in the kernel (scheduler and/or thermal at the time > of writing) can benefit from knowing about the energy consumed by CPUs. > Yet, this information can come from different sources (DT or firmware for > example), in different formats,

Re: [PATCH v6 06/11] cpufreq/schedutil: use dl utilization tracking

2018-06-08 Thread Juri Lelli
On 08/06/18 14:54, Juri Lelli wrote: > On 08/06/18 14:48, Vincent Guittot wrote: > > On 8 June 2018 at 14:39, Juri Lelli wrote: > > > Hi Vincent, > > > > > > On 08/06/18 14:09, Vincent Guittot wrote: > > >> Now that we have both the

Re: [PATCH v6 06/11] cpufreq/schedutil: use dl utilization tracking

2018-06-08 Thread Juri Lelli
On 08/06/18 14:48, Vincent Guittot wrote: > On 8 June 2018 at 14:39, Juri Lelli wrote: > > Hi Vincent, > > > > On 08/06/18 14:09, Vincent Guittot wrote: > >> Now that we have both the dl class bandwidth requirement and the dl class > >> utilization, we

Re: [PATCH v6 06/11] cpufreq/schedutil: use dl utilization tracking

2018-06-08 Thread Juri Lelli
Hi Vincent, On 08/06/18 14:09, Vincent Guittot wrote: > Now that we have both the dl class bandwidth requirement and the dl class > utilization, we can detect when CPU is fully used so we should run at max. > Otherwise, we keep using the dl bandwidth requirement to define the > utilization of the

Re: [RFC PATCH v3 09/10] sched/fair: Select an energy-efficient CPU on task wake-up

2018-06-08 Thread Juri Lelli
Hi, On 21/05/18 15:25, Quentin Perret wrote: [...] > +static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) > +{ > + unsigned long cur_energy, prev_energy, best_energy, cpu_cap, task_util; > + int cpu, best_energy_cpu = prev_cpu; > + struct sched_energy_fd *sfd;

Re: [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework

2018-06-08 Thread Juri Lelli
On 08/06/18 09:25, Quentin Perret wrote: > Hi Dietmar, > > On Thursday 07 Jun 2018 at 17:55:32 (+0200), Dietmar Eggemann wrote: [...] > > IMHO, part of the problem why this might be harder to understand is the fact > > that the patches show the use of the 2. init call > >

Re: [RFC PATCH v3 07/10] sched/fair: Introduce an energy estimation helper function

2018-06-08 Thread Juri Lelli
On 21/05/18 15:25, Quentin Perret wrote: [...] > +static long compute_energy(struct task_struct *p, int dst_cpu) > +{ > + long util, max_util, sum_util, energy = 0; > + struct sched_energy_fd *sfd; > + int cpu; > + > + for_each_freq_domain(sfd) { > + max_util =

Re: [RFC PATCH v3 09/10] sched/fair: Select an energy-efficient CPU on task wake-up

2018-06-08 Thread Juri Lelli
On 08/06/18 12:19, Quentin Perret wrote: > On Friday 08 Jun 2018 at 12:24:46 (+0200), Juri Lelli wrote: > > Hi, > > > > On 21/05/18 15:25, Quentin Perret wrote: > > > > [...] > > > > > +static int find_energy_efficient_cpu(struct task_struct

Re: [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework

2018-06-07 Thread Juri Lelli
On 07/06/18 16:19, Quentin Perret wrote: > Hi Juri, > > On Thursday 07 Jun 2018 at 16:44:09 (+0200), Juri Lelli wrote: > > On 21/05/18 15:24, Quentin Perret wrote: [...] > > > +static void fd_update_cs_table(struct em_cs_table *cs_table, int cpu) > > &

Re: [RFC PATCH v3 05/10] sched/topology: Reference the Energy Model of CPUs when available

2018-06-07 Thread Juri Lelli
On 07/06/18 17:02, Quentin Perret wrote: > On Thursday 07 Jun 2018 at 16:44:22 (+0200), Juri Lelli wrote: > > Hi, > > > > On 21/05/18 15:25, Quentin Perret wrote: > > > In order to use EAS, the task scheduler has to know about the Energy > > > Model (E

Re: [RFC PATCH v3 05/10] sched/topology: Reference the Energy Model of CPUs when available

2018-06-07 Thread Juri Lelli
Hi, On 21/05/18 15:25, Quentin Perret wrote: > In order to use EAS, the task scheduler has to know about the Energy > Model (EM) of the platform. This commit extends the scheduler topology > code to take references on the frequency domains objects of the EM > framework for all online CPUs. Hence,

[PATCH v4 3/5] sched/core: Streamlining calls to task_rq_unlock()

2018-06-13 Thread Juri Lelli
From: Mathieu Poirier Calls to task_rq_unlock() are done several times in function __sched_setscheduler(). This is fine when only the rq lock needs to be handled but not so much when other locks come into play. This patch streamlines the release of the rq lock so that only one location need to

[PATCH v4 0/5] sched/deadline: fix cpusets bandwidth accounting

2018-06-13 Thread Juri Lelli
Hi, This is v4 of a series of patches, authored by Mathieu (thanks for your work and for allowing me to try to move this forward), with the intent of fixing a long standing issue of SCHED_DEADLINE bandwidth accounting. As originally reported by Steve [1], when hotplug and/or (certain) cpuset

[PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-13 Thread Juri Lelli
Lelli Signed-off-by: Mathieu Poirier [modified changelog] Signed-off-by: Juri Lelli --- kernel/sched/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 61a1125c1ae4..96eee22fafe8 100644 --- a/kernel/sched/topology.c +++ b/kernel

[PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-13 Thread Juri Lelli
-by: Juri Lelli --- include/linux/cpuset.h | 6 ++ kernel/cgroup/cpuset.c | 16 kernel/sched/core.c| 14 ++ 3 files changed, 36 insertions(+) diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 934633a05d20..a1970862ab8e 100644 --- a/include/linux

[PATCH v4 2/5] sched/topology: Adding function partition_sched_domains_locked()

2018-06-13 Thread Juri Lelli
From: Mathieu Poirier Introducing function partition_sched_domains_locked() by taking the mutex locking code out of the original function. That way the work done by partition_sched_domains_locked() can be reused without dropping the mutex lock. No change of functionality is introduced by this

[PATCH v4 5/5] cpuset: Rebuild root domain deadline accounting information

2018-06-13 Thread Juri Lelli
From: Mathieu Poirier When the topology of root domains is modified by CPUset or CPUhotplug operations information about the current deadline bandwidth held in the root domain is lost. This patch address the issue by recalculating the lost deadline bandwidth information by circling through the

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-15 Thread Juri Lelli
On 15/06/18 09:01, Juri Lelli wrote: [...] > I'll try harder to find alternatives, but suggestions are welcome! :-) I wonder if something like the following might actually work. IIUC cpuset.c comment [1], callback_lock is the one to actually take if one needs to only query cpusets. [1] ht

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 09:47, Steven Rostedt wrote: > On Thu, 14 Jun 2018 15:42:34 +0200 > Juri Lelli wrote: > > > On 14/06/18 09:33, Steven Rostedt wrote: > > > On Wed, 13 Jun 2018 14:17:07 +0200 > > > Juri Lelli wrote: > > > > > > > From: Mathie

Re: [PATCH v4 2/5] sched/topology: Adding function partition_sched_domains_locked()

2018-06-14 Thread Juri Lelli
On 14/06/18 09:35, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:08 +0200 > Juri Lelli wrote: [...] > > +/* > > + * Call with hotplug lock held > > + */ > > +void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], > > +

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 09:33, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:07 +0200 > Juri Lelli wrote: > > > From: Mathieu Poirier > > > > The comment above function partition_sched_domains() clearly state that > > the cpu_hotplug_lock should be held

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 15:18, Quentin Perret wrote: > On Thursday 14 Jun 2018 at 16:11:18 (+0200), Juri Lelli wrote: > > On 14/06/18 14:58, Quentin Perret wrote: > > > > [...] > > > > > Hmm not sure if this can help but I think that rebuild_sched_domains() > >

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 14:58, Quentin Perret wrote: [...] > Hmm not sure if this can help but I think that rebuild_sched_domains() > does _not_ take the hotplug lock before calling partition_sched_domains() > when CONFIG_CPUSETS=n. But it does take it for CONFIG_CPUSETS=y. Did you mean cpuset_mutex?

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-14 Thread Juri Lelli
On 14/06/18 09:45, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:10 +0200 > Ju > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > > index b42037e6e81d..d26fd4795aa3 100644 > > --- a/kernel/cgroup/cpuset.c > > +++ b/kernel/cgroup/cpuset.c > > @@ -2409,6 +2409,22 @@ void __init

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-15 Thread Juri Lelli
On 14/06/18 16:11, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:10 +0200 > Juri Lelli wrote: > > > +/** > > + * cpuset_lock - Grab the cpuset_mutex from another subsysytem > > + */ > > +int cpuset_lock(void) > >

Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-29 Thread Juri Lelli
On 28/05/18 21:24, Waiman Long wrote: > On 05/28/2018 09:12 PM, Waiman Long wrote: > > On 05/24/2018 06:28 AM, Juri Lelli wrote: > >> On 17/05/18 16:55, Waiman Long wrote: > >> > >> [...] > >> > >>> @@ -849,7 +860,12 @@ static void r

Re: [PATCH v5 05/10] cpufreq/schedutil: get max utilization

2018-05-29 Thread Juri Lelli
On 28/05/18 22:08, Joel Fernandes wrote: > On Mon, May 28, 2018 at 12:12:34PM +0200, Juri Lelli wrote: > [..] > > > + > > > + util = max_t(unsigned long, util, READ_ONCE(rq->avg_dl.util_avg)); > > > + > > > + return util; > > > > A

Re: [PATCH v5 05/10] cpufreq/schedutil: get max utilization

2018-05-28 Thread Juri Lelli
Hi Vincent, On 25/05/18 15:12, Vincent Guittot wrote: > Now that we have both the dl class bandwidth requirement and the dl class > utilization, we can use the max of the 2 values when agregating the > utilization of the CPU. > > Signed-off-by: Vincent Guittot > ---

<    4   5   6   7   8   9   10   11   12   >