Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 17:36, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 14:26, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > > > > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > > > wrote: > >

Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 16:30, Valentin Schneider wrote: > > On 19/12/2018 15:20, Vincent Guittot wrote: > [...] > >> Oh yes, I never said it didn't work - I was doing some investigation on > >> the reason as to why we'd need this fix, because it's wa

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > wrote: > > > > Some drivers (like i915/drm) need to get the accounted suspended time. > > pm_runtime_accounted_time_get() will return the suspended or active > >

Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 16:11, Valentin Schneider wrote: > > On 19/12/2018 15:05, Vincent Guittot wrote: > [...] > >> True, I had a look at the trace and there doesn't seem to be any running > >> task on that CPU. That's a separate matter however - the rounding

Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 15:59, Valentin Schneider wrote: > > > > On 19/12/2018 13:39, Vincent Guittot wrote: > [...] > >> I used that setup out of convenience for myself, but AFAICT that use-case > >> just stresses that issue. > > > > After looking at y

Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 12:58, Valentin Schneider wrote: > > On 19/12/2018 08:32, Vincent Guittot wrote: > [...] > > This is another UC, asym packing is used at SMT level for now and we > > don't face this kind of problem, it has been also tested and DynamiQ > > c

Re: [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 12:16, Valentin Schneider wrote: > > On 19/12/2018 08:27, Vincent Guittot wrote: > [...] > >> Wouldn't LBF_ALL_PINNED cover all relevant cases? It's set at the very top > >> of the 'if (busiest->nr_running > 1)' block a

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > > > > > > > > > > > > > > diff --git a/driver

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 11:11, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > > > > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > > > wrote: > >

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > wrote: > > > > Some drivers (like i915/drm) need to get the accounted suspended time. > > pm_runtime_accounted_time_get() will return the suspended or active > >

Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-19 Thread Vincent Guittot
On Tue, 18 Dec 2018 at 18:32, Valentin Schneider wrote: > > On 14/12/2018 16:01, Vincent Guittot wrote: > > When check_asym_packing() is triggered, the imbalance is set to : > > busiest_stat.avg_load * busiest_stat.group_capacity / SCHED_CAPACITY_SCALE > > busiest_stat.av

Re: [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-19 Thread Vincent Guittot
On Tue, 18 Dec 2018 at 15:09, Valentin Schneider wrote: > > On 18/12/2018 13:23, Vincent Guittot wrote: > [...] > >> Ah, I think I get it: you're saying that this balance_interval increase > >> is done because it is always assumed we do an active balance w

[RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-18 Thread Vincent Guittot
Some drivers (like i915/drm) need to get the accounted suspended time. pm_runtime_accounted_time_get() will return the suspended or active accounted time until now. Signed-off-by: Vincent Guittot --- drivers/base/power/runtime.c | 26 ++ include/linux/pm_runtime.h | 2

[RFC 2/3] drm/i915: Move on the new pm runtime interface

2018-12-18 Thread Vincent Guittot
Use the new pm runtime interface to get the accounted suspended time: pm_runtime_accounted_time_get() Signed-off-by: Vincent Guittot --- drivers/gpu/drm/i915/i915_pmu.c | 18 -- drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff

[PATCH v3 0/3] Move pm_runtime accounted time to raw nsec

2018-12-18 Thread Vincent Guittot
compilation error Changes since v1: - updated commit message of patch 1 - Added patches 2 & 3 to move runtime_pm accounting on raw ns Thara Gopinath (1): PM/runtime:Replace jiffies based accounting with ktime based accounting Vincent Guittot (2): PM/runtime: Add a new interface to

[PATCH 3/3] PM/runtime:Replace jiffies based accounting with ktime based accounting

2018-12-18 Thread Vincent Guittot
from ktime to raw nsec] Signed-off-by: Vincent Guittot --- drivers/base/power/runtime.c | 10 +- drivers/base/power/sysfs.c | 11 --- include/linux/pm.h | 6 +++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/base/power/runtime.c b/drivers

Re: [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-18 Thread Vincent Guittot
On Tue, 18 Dec 2018 at 12:46, Valentin Schneider wrote: > > On 18/12/2018 09:32, Vincent Guittot wrote: > [...] > > In this asym packing case, It has nothing to do with pinned tasks and > > that's the root cause of the problem: > > the active balance triggered by

Re: [PATCH v2 3/3] drm/i915: Move to new PM core fields

2018-12-18 Thread Vincent Guittot
On Tue, 18 Dec 2018 at 11:03, Rafael J. Wysocki wrote: > > On Tue, Dec 18, 2018 at 10:58 AM Vincent Guittot > wrote: > > > > On Tue, 18 Dec 2018 at 10:57, Rafael J. Wysocki wrote: > > > > > > On Mon, Dec 17, 2018 at 3:22 PM Vincent Guittot > > >

Re: [PATCH v2 3/3] drm/i915: Move to new PM core fields

2018-12-18 Thread Vincent Guittot
On Tue, 18 Dec 2018 at 10:57, Rafael J. Wysocki wrote: > > On Mon, Dec 17, 2018 at 3:22 PM Vincent Guittot > wrote: > > > > On Fri, 14 Dec 2018 at 15:36, Ulf Hansson wrote: > > > > > > On Fri, 14 Dec 2018 at 15:22, Vincent Guittot > > > wrote: &

Re: [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-18 Thread Vincent Guittot
Hi Valentin, On Mon, 17 Dec 2018 at 17:56, Valentin Schneider wrote: > > Hi Vincent, > > About time I had a look at this one... > > On 14/12/2018 16:01, Vincent Guittot wrote: > > In case of active balance, we increase the balance interval to cover > > pin

Re: [PATCH v2 2/3] sched/fair: trigger asym_packing during idle load balance

2018-12-18 Thread Vincent Guittot
On Mon, 17 Dec 2018 at 17:59, Valentin Schneider wrote: > > Hi Vincent, > > On 14/12/2018 16:01, Vincent Guittot wrote: > > newly idle load balance is not always triggered when a cpu becomes idle. > > This prevent the scheduler to get a chance to migrate task for asym pa

Re: [PATCH v2 3/3] drm/i915: Move to new PM core fields

2018-12-17 Thread Vincent Guittot
On Fri, 14 Dec 2018 at 15:36, Ulf Hansson wrote: > > On Fri, 14 Dec 2018 at 15:22, Vincent Guittot > wrote: > > > > With jiffies been replaced by raw ns in PM core accounting, 915 driver is > > updated to use this new time infrastructure. > > &

[PATCH v2 1/3] sched/fair: fix rounding issue for asym packing

2018-12-14 Thread Vincent Guittot
enough to skip the rq in find_busiest_queue and prevents asym migration to happen. Add 1 to the avg_load to make sure that the targeted cpu will not be skipped unexpectidly. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel

[PATCH v2 2/3] sched/fair: trigger asym_packing during idle load balance

2018-12-14 Thread Vincent Guittot
newly idle load balance is not always triggered when a cpu becomes idle. This prevent the scheduler to get a chance to migrate task for asym packing. Enable active migration because of asym packing during idle load balance too. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 2 +- 1

[PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-14 Thread Vincent Guittot
for asym_packing can be easily delayed for hundreds of ms because of this all_pinned detection mecanism. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c

[PATCH v2 0/3] sched/fair: some fixes for asym_packing

2018-12-14 Thread Vincent Guittot
Vincent Guittot (3): sched/fair: fix rounding issue for asym packing sched/fair: trigger asym_packing during idle load balance sched/fair: fix unnecessary increase of balance interval kernel/sched/fair.c | 33 + 1 file changed, 21 insertions(+), 12 deletions

[PATCH v2 1/3] PM/pm_runtime: move autosuspend on hrtimer

2018-12-14 Thread Vincent Guittot
filename 133042996805276 402768 20512343138fe57 vmlinux Signed-off-by: Vincent Guittot --- drivers/base/power/runtime.c | 63 include/linux/pm.h | 5 ++-- include/linux/pm_runtime.h | 6 ++--- 3 files changed, 40

[PATCH v2 2/3] PM/runtime:Replace jiffies based accouting with ktime based accounting

2018-12-14 Thread Vincent Guittot
from ktime to raw nsec] Signed-off-by: Vincent Guittot --- drivers/base/power/runtime.c | 10 +- drivers/base/power/sysfs.c | 11 --- include/linux/pm.h | 6 +++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/base/power/runtime.c b/drivers

[PATCH v2 3/3] drm/i915: Move to new PM core fields

2018-12-14 Thread Vincent Guittot
With jiffies been replaced by raw ns in PM core accounting, 915 driver is updated to use this new time infrastructure. Signed-off-by: Vincent Guittot --- drivers/gpu/drm/i915/i915_pmu.c | 12 ++-- drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions

[PATCH v2 0/3] PM/pm_runtime: move on hrtimer and nsec

2018-12-14 Thread Vincent Guittot
drm/i915 driver that uses PM core fields Changes since v1: - updated commit message of patch 1 - Added patches 2 & 3 to move runtime_pm accounting on raw ns Thara Gopinath (1): PM/runtime:Replace jiffies based accouting with ktime based accounting Vincent Guittot (2): PM/pm_runtime:

Re: [PATCH 3/3] sched/fair: fix unnecessary increase of balance interval

2018-12-13 Thread Vincent Guittot
On Thu, 13 Dec 2018 at 14:52, Peter Zijlstra wrote: > > On Tue, Aug 07, 2018 at 05:56:27PM +0200, Vincent Guittot wrote: > > +static inline bool > > +asym_active_balance(enum cpu_idle_type idle, unsigned int flags, int dst, > > int src) > > { >

Re: [PATCH v2] sched/fair: fix 1 task per CPU

2018-12-13 Thread Vincent Guittot
On Thu, 13 Dec 2018 at 14:12, Peter Zijlstra wrote: > > On Thu, Dec 13, 2018 at 12:04:20PM +0100, Vincent Guittot wrote: > > On Thu, 13 Dec 2018 at 11:44, Peter Zijlstra wrote: > > > > > > On Mon, Sep 10, 2018 at 04:43:09PM +0200, Vincent Guittot wrote: > > &

Re: [PATCH v2] sched/fair: fix 1 task per CPU

2018-12-13 Thread Vincent Guittot
On Thu, 13 Dec 2018 at 11:44, Peter Zijlstra wrote: > > On Mon, Sep 10, 2018 at 04:43:09PM +0200, Vincent Guittot wrote: > > When CPUs have different capacity because of RT/DL tasks or > > micro-architecture or max frequency differences, there are situation where > &

Re: [PATCH v2] sched/fair: fix 1 task per CPU

2018-12-13 Thread Vincent Guittot
Hi Peter, Ingo, On Fri, 14 Sep 2018 at 18:26, Vincent Guittot wrote: > > On Fri, 14 Sep 2018 at 05:22, Valentin Schneider > wrote: > > > > Hi, > > > > On 10/09/18 07:43, Vincent Guittot wrote: > > > When CPUs have different capacity because of RT/D

[tip:sched/core] sched/topology: Remove the ::smt_gain field from 'struct sched_domain'

2018-12-11 Thread tip-bot for Vincent Guittot
Commit-ID: 765d0af19f5f388a34bf4533378f8398b72ded46 Gitweb: https://git.kernel.org/tip/765d0af19f5f388a34bf4533378f8398b72ded46 Author: Vincent Guittot AuthorDate: Wed, 29 Aug 2018 15:19:11 +0200 Committer: Ingo Molnar CommitDate: Tue, 11 Dec 2018 15:16:57 +0100 sched/topology: Remove

Re: [PATCH] sched/fair: move capacity_margin definition into #ifdef

2018-12-10 Thread Vincent Guittot
Hi Arnd, On Mon, 10 Dec 2018 at 22:01, Arnd Bergmann wrote: > > Marking the variable static showed that it's only used for > SMP builds, as seen from this warning: > > kernel/sched/fair.c:119:21: error: 'capacity_margin' defined but not used > [-Werror=unused-variable] > static unsigned int cap

Re: [PATCH v4 00/10] steal tasks to improve CPU utilization

2018-12-10 Thread Vincent Guittot
On Mon, 10 Dec 2018 at 17:33, Vincent Guittot wrote: > > On Mon, 10 Dec 2018 at 17:29, Steven Sistare > wrote: > > > > On 12/10/2018 11:10 AM, Vincent Guittot wrote: > > > Hi Steven, > > > > > > On Thu, 6 Dec 2018 at 22:38, Steve Sistare >

Re: [PATCH v4 00/10] steal tasks to improve CPU utilization

2018-12-10 Thread Vincent Guittot
On Mon, 10 Dec 2018 at 17:29, Steven Sistare wrote: > > On 12/10/2018 11:10 AM, Vincent Guittot wrote: > > Hi Steven, > > > > On Thu, 6 Dec 2018 at 22:38, Steve Sistare > > wrote: > >> > >> When a CPU has no more CFS tasks to run, and idle_bala

Re: [PATCH v4 00/10] steal tasks to improve CPU utilization

2018-12-10 Thread Vincent Guittot
Hi Steven, On Thu, 6 Dec 2018 at 22:38, Steve Sistare wrote: > > When a CPU has no more CFS tasks to run, and idle_balance() fails to > find a task, then attempt to steal a task from an overloaded CPU in the > same LLC. Maintain and use a bitmap of overloaded CPUs to efficiently > identify candid

Re: [RFC PATCH 5/7] sched/fair: Enable CFS periodic tick to update thermal pressure

2018-12-04 Thread Vincent Guittot
Hi Thara, On Tue, 9 Oct 2018 at 18:25, Thara Gopinath wrote: > > Introduce support in CFS periodic tick to trigger the process of > computing average thermal pressure for a cpu. > > Signed-off-by: Thara Gopinath > --- > kernel/sched/fair.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --g

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-29 Thread Vincent Guittot
On Thu, 29 Nov 2018 at 16:00, Patrick Bellasi wrote: > > On 29-Nov 11:43, Vincent Guittot wrote: > > On Wed, 28 Nov 2018 at 17:35, Patrick Bellasi > > wrote: > > > On 28-Nov 16:42, Vincent Guittot wrote: > > > > On Wed, 28 Nov 2018 at 16:21, Patrick Bella

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-29 Thread Vincent Guittot
On Wed, 28 Nov 2018 at 17:35, Patrick Bellasi wrote: > > On 28-Nov 16:42, Vincent Guittot wrote: > > On Wed, 28 Nov 2018 at 16:21, Patrick Bellasi > > wrote: > > > > > > On 28-Nov 15:55, Vincent Guittot wrote: > > > > On Wed, 28 No

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-28 Thread Vincent Guittot
On Wed, 28 Nov 2018 at 16:21, Patrick Bellasi wrote: > > On 28-Nov 15:55, Vincent Guittot wrote: > > On Wed, 28 Nov 2018 at 15:40, Patrick Bellasi > > wrote: > > > > > > On 28-Nov 14:33, Vincent Guittot wrote: > > > > On Wed, 28 No

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-28 Thread Vincent Guittot
On Wed, 28 Nov 2018 at 15:40, Patrick Bellasi wrote: > > On 28-Nov 14:33, Vincent Guittot wrote: > > On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi > > wrote: > > > > > > On 28-Nov 11:02, Peter Zijlstra wrote: > > > > On Wed, Nov 28,

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-28 Thread Vincent Guittot
On Wed, 28 Nov 2018 at 14:33, Vincent Guittot wrote: > > On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi wrote: > > > > On 28-Nov 11:02, Peter Zijlstra wrote: > > > On Wed, Nov 28, 2018 at 10:54:13AM +0100, Vincent Guittot wrote: > > > > > > > I

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-28 Thread Vincent Guittot
On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi wrote: > > On 28-Nov 11:02, Peter Zijlstra wrote: > > On Wed, Nov 28, 2018 at 10:54:13AM +0100, Vincent Guittot wrote: > > > > > Is there anything else that I should do for these patches ? > > > > IIRC, Morten m

Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-28 Thread Vincent Guittot
Hi, On Tue, 20 Nov 2018 at 11:55, Vincent Guittot wrote: > > The current implementation of load tracking invariance scales the > contribution with current frequency and uarch performance (only for > utilization) of the CPU. One main result of this formula is that the > figure

Re: [PATCH] sched/fair: Clean up comment in nohz_idle_balance()

2018-11-27 Thread Vincent Guittot
ader with misleading/out-of-date comments. > > [1] > http://lkml.kernel.org/r/cakftptbja-ocbrko6__npqwl3+hljzk7riccpu1r7ydo-ep...@mail.gmail.com > > Suggested-by: Vincent Guittot > Signed-off-by: Andrea Parri > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Vincent Guittot

Re: [Question] atomic_fetch_andnot() in nohz_idle_balance()

2018-11-27 Thread Vincent Guittot
On Mon, 26 Nov 2018 at 21:44, Andrea Parri wrote: > > On Mon, Nov 26, 2018 at 12:37:00PM +0100, Vincent Guittot wrote: > > On Mon, 26 Nov 2018 at 10:30, Peter Zijlstra wrote: > > > > > > On Wed, Nov 21, 2018 at 11:34:53PM +0100, Andrea Parri wrote: > > > &g

Re: [Question] atomic_fetch_andnot() in nohz_idle_balance()

2018-11-26 Thread Vincent Guittot
On Mon, 26 Nov 2018 at 10:30, Peter Zijlstra wrote: > > On Wed, Nov 21, 2018 at 11:34:53PM +0100, Andrea Parri wrote: > > Hi, > > > > The comment for the atomic_fetch_andnot() in nohz_idle_balance() says: > > > > "barrier, pairs with nohz_balance_enter_idle(), ensures ..." > > > > which, well, d

[PATCH v7 2/2] sched/fair: update scale invariance of PELT

2018-11-20 Thread Vincent Guittot
13ms 32ms 26ms On my hikey (octo Arm64 platform) with schedutil governor, the time to reach max OPP when starting from a null utilization, decreases from 223ms with current scale invariance down to 121ms with the new algorithm. Signed-off-by: Vincent Guittot --- incl

[PATCH v7 1/2] sched/fair: move rq_of helper function

2018-11-20 Thread Vincent Guittot
Move rq_of() helper function so it can be used in pelt.c Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 13 - kernel/sched/sched.h | 16 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

[PATCH v7 0/2] sched/fair: update scale invariance of PELT

2018-11-20 Thread Vincent Guittot
ts the new scaling algorithm Changes since v5: - Fix niptick raised by Dietmar - Upodated some comments - Remove some unused variables - No functional change Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT include/linux/sched

Re: [PATCH v6 2/2] sched/fair: update scale invariance of PELT

2018-11-14 Thread Vincent Guittot
On Mon, 12 Nov 2018 at 18:53, Dietmar Eggemann wrote: > > On 11/9/18 8:20 AM, Vincent Guittot wrote: > > [...] > > > In order to achieve this time scaling, a new clock_pelt is created per rq. > > The increase of this clock scales with current capacity when somethi

[PATCH v6 2/2] sched/fair: update scale invariance of PELT

2018-11-09 Thread Vincent Guittot
32ms 26ms On my hikey (octo Arm64 platform) with schedutil governor, the time to reach max OPP when starting from a null utilization, decreases from 223ms with current scale invariance down to 121ms with the new algorithm. Signed-off-by: Vincent Guittot --- kernel/sched/core

[PATCH v6 1/2] sched/fair: move rq_of helper function

2018-11-09 Thread Vincent Guittot
Move rq_of() helper function so it can be used in pelt.c Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 13 - kernel/sched/sched.h | 16 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

[PATCH v6 0/2] sched/fair: update scale invariance of PELT

2018-11-09 Thread Vincent Guittot
ts the new scaling algorithm Changes since v5: - Fix running_sum scaling in update_tg_cfs_runnable() raised by Dietmar - Remove unused cpu parameters raised by Dietmar Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT kernel/sched/core.c

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-11-08 Thread Vincent Guittot
On Thu, 8 Nov 2018 at 12:35, Quentin Perret wrote: > > On Wednesday 07 Nov 2018 at 11:47:09 (+0100), Dietmar Eggemann wrote: > > The important bit for EAS is that it only uses utilization in the > > non-overutilized case. Here, utilization signals should look the same > > between the two approache

Re: [PATCH v8 03/15] PM: Introduce an Energy Model management framework

2018-11-07 Thread Vincent Guittot
On Wed, 7 Nov 2018 at 18:02, Quentin Perret wrote: > > Hi Vincent, > > On Wednesday 07 Nov 2018 at 17:32:32 (+0100), Vincent Guittot wrote: > > Hi Quentin, > > > > On Tue, 16 Oct 2018 at 12:15, Quentin Perret wrote: > > > > > > > > + >

Re: [PATCH v8 03/15] PM: Introduce an Energy Model management framework

2018-11-07 Thread Vincent Guittot
Hi Quentin, On Tue, 16 Oct 2018 at 12:15, Quentin Perret wrote: > > + > +/** > + * em_pd_energy() - Estimates the energy consumed by the CPUs of a perf. > domain > + * @pd : performance domain for which energy has to be estimated > + * @max_util : highest utilization among CPUs of the

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-11-07 Thread Vincent Guittot
On Wed, 7 Nov 2018 at 11:47, Dietmar Eggemann wrote: > > On 11/5/18 10:10 AM, Vincent Guittot wrote: > > On Fri, 2 Nov 2018 at 16:36, Dietmar Eggemann > > wrote: > >> > >> On 10/26/18 6:11 PM, Vincent Guittot wrote: > > [...] > > >> Thi

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-11-06 Thread Vincent Guittot
On Mon, 5 Nov 2018 at 15:59, Morten Rasmussen wrote: > > On Mon, Nov 05, 2018 at 10:10:34AM +0100, Vincent Guittot wrote: > > On Fri, 2 Nov 2018 at 16:36, Dietmar Eggemann > > wrote: > > > ... > > > > > > > > In order to achieve this time s

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-11-05 Thread Vincent Guittot
On Fri, 2 Nov 2018 at 16:36, Dietmar Eggemann wrote: > > On 10/26/18 6:11 PM, Vincent Guittot wrote: > > The current implementation of load tracking invariance scales the > > contribution with current frequency and uarch performance (only for > > utilization) of the CPU.

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-11-05 Thread Vincent Guittot
On Thu, 1 Nov 2018 at 10:38, Dietmar Eggemann wrote: > > On 10/31/18 10:18 AM, Vincent Guittot wrote: > > Hi Dietmar, > > > > On Wed, 31 Oct 2018 at 08:20, Dietmar Eggemann > > wrote: > >> > >> On 10/26/18 6:11 PM, Vincent Guittot

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-10-31 Thread Vincent Guittot
Hi Dietmar, On Wed, 31 Oct 2018 at 08:20, Dietmar Eggemann wrote: > > On 10/26/18 6:11 PM, Vincent Guittot wrote: > > [...] > > > static int select_idle_sibling(struct task_struct *p, int prev_cpu, int > > cpu); > > static unsigned long task_h_load(stru

Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-10-30 Thread Vincent Guittot
Hi Pavan, On Tue, 30 Oct 2018 at 10:19, Pavan Kondeti wrote: > > Hi Vincent, > > On Fri, Oct 26, 2018 at 06:11:43PM +0200, Vincent Guittot wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 6806c27..7a69673 100644 > > --- a/kernel/sched

[PATCH v5 1/2] sched/fair: move rq_of helper function

2018-10-26 Thread Vincent Guittot
Move rq_of() helper function so it can be used in pelt.c Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 13 - kernel/sched/sched.h | 16 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

[PATCH v5 2/2] sched/fair: update scale invariance of PELT

2018-10-26 Thread Vincent Guittot
32ms 26ms On my hikey (octo ARM platform) with schedutil governor, the time to reach max OPP when starting from a null utilization, decreases from 223ms with current scale invariance down to 121ms with the new algorithm. Signed-off-by: Vincent Guittot --- kernel/sched/core

[PATCH v5 0/2] sched/fair: update scale invariance of PELT

2018-10-26 Thread Vincent Guittot
ew scaling algorithm Changes since v4: - Fix compile issue for !SMP raised by kbuild test robot - Fix lost_idle_time update raised by Pavan Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT kernel/sched/core.c | 1 + kernel/sched/

Re: [PATCH 00/10] steal tasks to improve CPU utilization

2018-10-25 Thread Vincent Guittot
On Thu, 25 Oct 2018 at 13:29, Steven Sistare wrote: > > On 10/25/2018 3:50 AM, Vincent Guittot wrote: > > Hi Steve, > > > > On Mon, 22 Oct 2018 at 17:10, Steve Sistare > > wrote: > >> > >> When a CPU has no more CFS tasks to run, and idle_bala

Re: [PATCH v4 2/2] sched/fair: update scale invariance of PELT

2018-10-25 Thread Vincent Guittot
On Thu, 25 Oct 2018 at 12:36, Dietmar Eggemann wrote: > > Hi Vincent, > > On 10/19/18 6:17 PM, Vincent Guittot wrote: > > The current implementation of load tracking invariance scales the > > contribution with current frequency and uarch performance (only for > > uti

Re: [PATCH 00/10] steal tasks to improve CPU utilization

2018-10-25 Thread Vincent Guittot
Hi Steve, On Mon, 22 Oct 2018 at 17:10, Steve Sistare wrote: > > When a CPU has no more CFS tasks to run, and idle_balance() fails to > find a task, then attempt to steal a task from an overloaded CPU in the > same LLC. Maintain and use a bitmap of overloaded CPUs to efficiently > identify candid

Re: [PATCH v4 2/2] sched/fair: update scale invariance of PELT

2018-10-24 Thread Vincent Guittot
Hi Pavan, On Wed, 24 Oct 2018 at 06:53, Pavan Kondeti wrote: > > Hi Vincent, > > Thanks for the detailed explanation. > > On Tue, Oct 23, 2018 at 02:15:08PM +0200, Vincent Guittot wrote: > > Hi Pavan, > > > > On Tue, 23 Oct 2018 at 07:59, Pavan Ko

Re: [PATCH v4 2/2] sched/fair: update scale invariance of PELT

2018-10-23 Thread Vincent Guittot
Hi Pavan, On Tue, 23 Oct 2018 at 07:59, Pavan Kondeti wrote: > > Hi Vincent, > > On Fri, Oct 19, 2018 at 06:17:51PM +0200, Vincent Guittot wrote: > > > > /* > > + * The clock_pelt scales the time to reflect the effective amount of > > + * computation done du

Re: [PATCH v4 2/2] sched/fair: update scale invariance of PELT

2018-10-23 Thread Vincent Guittot
On Tue, 23 Oct 2018 at 12:01, Peter Zijlstra wrote: > > On Fri, Oct 19, 2018 at 06:17:51PM +0200, Vincent Guittot wrote: > > In order to achieve this time scaling, a new clock_pelt is created per rq. > > > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h &g

[PATCH v4 2/2] sched/fair: update scale invariance of PELT

2018-10-19 Thread Vincent Guittot
rnor, the time to reach max OPP when starting from a null utilization, decreases from 223ms with current scale invariance down to 121ms with the new algorithm. For this test, I have enable arch_scale_freq for arm64. Signed-off-by: Vincent Guittot --- kernel/sched/core.c | 2 +- kernel

[PATCH v4 0/2] sched/fair: update scale invariance of PELT

2018-10-19 Thread Vincent Guittot
ts the new scaling algorithm Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 6 ++-- kernel/sched/fair.c | 29 +--- kernel/sched/pelt.

[PATCH 1/2] sched/fair: move rq_of helper function

2018-10-19 Thread Vincent Guittot
Move rq_of() helper function so it can be used in pelt.c Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 13 - kernel/sched/sched.h | 16 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-16 Thread Vincent Guittot
Hi Lukasz, On Thu, 11 Oct 2018 at 13:10, Lukasz Luba wrote: > > > > On 10/10/2018 07:30 PM, Thara Gopinath wrote: > > Hello Lukasz, > > > > On 10/10/2018 11:35 AM, Lukasz Luba wrote: > >> Hi Thara, > >> > >> I have run it on Exynos5433 mainline. > >> When it is enabled with step_wise thermal gove

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 15:48, Quentin Perret wrote: > > On Wednesday 10 Oct 2018 at 15:27:57 (+0200), Vincent Guittot wrote: > > On Wed, 10 Oct 2018 at 15:05, Quentin Perret wrote: > > > > > > On Wednesday 10 Oct 2018 at 14:04:40 (+0200), Vincent Guittot wrote:

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 15:35, Juri Lelli wrote: > > On 10/10/18 15:08, Vincent Guittot wrote: > > On Wed, 10 Oct 2018 at 14:50, Juri Lelli wrote: > > > > > > On 10/10/18 14:34, Vincent Guittot wrote: > > > > Hi Juri, > > > > &

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 15:05, Quentin Perret wrote: > > On Wednesday 10 Oct 2018 at 14:04:40 (+0200), Vincent Guittot wrote: > > This patchset doesn't touch cpu_capacity_orig and doesn't need to as > > it assume that the max capacity is unchanged but some capacit

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 14:50, Juri Lelli wrote: > > On 10/10/18 14:34, Vincent Guittot wrote: > > Hi Juri, > > > > On Wed, 10 Oct 2018 at 14:23, Juri Lelli wrote: > > > > > > On 10/10/18 14:04, Vincent Guittot wrote: > > > > > > [

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
Hi Juri, On Wed, 10 Oct 2018 at 14:23, Juri Lelli wrote: > > On 10/10/18 14:04, Vincent Guittot wrote: > > [...] > > > The problem was the same with RT, the cfs utilization was lower than > > reality because RT steals soem cycle to CFS > > So schedutil was sel

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 12:36, Quentin Perret wrote: > > On Wednesday 10 Oct 2018 at 12:14:32 (+0200), Vincent Guittot wrote: > > On Wed, 10 Oct 2018 at 11:55, Quentin Perret wrote: > > > > > > Hi Vincent, > > > > > > On Wednesday 10 Oct

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 11:55, Quentin Perret wrote: > > Hi Vincent, > > On Wednesday 10 Oct 2018 at 10:50:05 (+0200), Vincent Guittot wrote: > > The problem with reflecting directly the capping is that it happens > > far more often than the pace at which cpu_capacity_or

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Vincent Guittot
On Wed, 10 Oct 2018 at 10:29, Quentin Perret wrote: > > Hi Thara, > > On Wednesday 10 Oct 2018 at 08:17:51 (+0200), Ingo Molnar wrote: > > > > * Thara Gopinath wrote: > > > > > Thermal governors can respond to an overheat event for a cpu by > > > capping the cpu's maximum possible frequency. This

[tip:sched/core] sched/pelt: Fix warning and clean up IRQ PELT config

2018-10-02 Thread tip-bot for Vincent Guittot
Commit-ID: 11d4afd4ff667f9b6178ee8c142c36cb78bd84db Gitweb: https://git.kernel.org/tip/11d4afd4ff667f9b6178ee8c142c36cb78bd84db Author: Vincent Guittot AuthorDate: Tue, 25 Sep 2018 11:17:42 +0200 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 09:45:00 +0200 sched/pelt: Fix warning

[PATCH v2] sched/schedutil : optimize computation of utilization in schedutil

2018-10-02 Thread Vincent Guittot
Scaling the utilization of CPUs with irq util_avg in schedutil doesn't give any benefit and just waste CPU cycles when irq time is not accounted but only steal time. Skip the irq scaling when irq time is not accounted Suggested-by: Wanpeng Li Signed-off-by: Vincent Guittot --- kernel/

[RESEND PATCH 3/3] sched/fair: fix unnecessary increase of balance interval

2018-10-02 Thread Vincent Guittot
for asym_packing can be easily delayed for hundreds of ms because of this all_pinned detection mecanism. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c

[RESEND PATCH 0/3] sched/fair: some fixes for asym_packing

2018-10-02 Thread Vincent Guittot
patches fixes the problems raised for lmbench and the rt-app UC that creates 2 tasks that start as small tasks and then become suddenly always running tasks. (I can provide the rt-app json is needed) - Rebase on latest tip/sched/core Vincent Guittot (3): sched/fair: fix rounding issue for asym

[RESEND PATCH 1/3] sched/fair: fix rounding issue for asym packing

2018-10-02 Thread Vincent Guittot
enough to skip the rq in find_busiest_queue and prevents asym migration to happen. Add 1 to the avg_load to make sure that the targeted cpu will not be skipped unexpectidly. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel

[RESEND PATCH 2/3] sched/fair: trigger asym_packing during idle load balance

2018-10-02 Thread Vincent Guittot
newly idle load balance is not always triggered when a cpu becomes idle. This prevent the scheduler to get a chance to migrate task for asym packing. Enable active migration because of asym packing during idle load balance too. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 2 +- 1

Re: [PATCH] sched/pelt: fix warning and cleanup irq pelt config

2018-10-02 Thread Vincent Guittot
On Tue, 25 Sep 2018 at 11:17, Vincent Guittot wrote: > > Create a config for enabling irq load tracking in the scheduler. > irq load tracking is useful only when irq or paravirtual time is > accounted but it's only possible with SMP for now. > > Also use __maybe_unused to

Re: [PATCH] sched/fair: Don't increase sd->balance_interval on newidle balance

2018-09-26 Thread Vincent Guittot
On Wed, 26 Sep 2018 at 15:17, Peter Zijlstra wrote: > > On Wed, Sep 26, 2018 at 12:33:25PM +0200, Vincent Guittot wrote: > > On Wed, 26 Sep 2018 at 11:35, Valentin Schneider > > > > library I use) has some phase where it spawns at lot of tasks at once to > >

Re: [PATCH] sched/fair: Don't increase sd->balance_interval on newidle balance

2018-09-26 Thread Vincent Guittot
On Wed, 26 Sep 2018 at 15:16, Valentin Schneider wrote: > > On 26/09/18 11:33, Vincent Guittot wrote: > > On Wed, 26 Sep 2018 at 11:35, Valentin Schneider > > [...] > >>> Can you give us details about the use case that you care about ? > >>> > &

Re: [PATCH] sched/fair: Don't increase sd->balance_interval on newidle balance

2018-09-26 Thread Vincent Guittot
On Wed, 26 Sep 2018 at 11:35, Valentin Schneider wrote: > > Hi, > > On 26/09/18 09:13, Vincent Guittot wrote: > > On Tue, 25 Sep 2018 at 19:38, Valentin Schneider > > wrote: > >> > >> When load_balance() fails to move some load because of t

Re: [PATCH] sched/fair: Don't increase sd->balance_interval on newidle balance

2018-09-26 Thread Vincent Guittot
On Tue, 25 Sep 2018 at 19:38, Valentin Schneider wrote: > > When load_balance() fails to move some load because of task affinity, > we end up increasing sd->balance_interval to delay the next periodic > balance in the hopes that next time we look, that annoying pinned > task(s) will be gone. It's

[PATCH] sched/pelt: fix warning and cleanup irq pelt config

2018-09-25 Thread Vincent Guittot
ed by: commit 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()") Reported-by: Dou Liyang Reported-by: Miguel Ojeda Suggested-by: Ingo Molnar Fixes: 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()") Signed-off-by: Vincent Guittot ---

Re: [tip:sched/core] sched/fair: Remove #ifdefs from scale_rt_capacity()

2018-09-15 Thread Vincent Guittot
On Sat, 15 Sep 2018 at 14:30, Ingo Molnar wrote: > > > * Vincent Guittot wrote: > > > Hi Ingo, > > > > On Sat, 15 Sep 2018 at 13:47, Ingo Molnar wrote: > > > > > > > > > * tip-bot for Vincent Guittot wrote: > > > > >

<    4   5   6   7   8   9   10   11   12   13   >