Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-04 Thread Vincent Guittot
On Fri, 4 Dec 2020 at 16:40, Mel Gorman wrote: > > On Fri, Dec 04, 2020 at 04:23:48PM +0100, Vincent Guittot wrote: > > On Fri, 4 Dec 2020 at 15:31, Mel Gorman wrote: > > > > > > On Fri, Dec 04, 2020 at 02:47:48PM +0100, Vincent Guittot wrote: > > > > &g

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-24 Thread Vincent Guittot
Hi Aubrey, Le mardi 24 nov. 2020 à 15:01:38 (+0800), Li, Aubrey a écrit : > Hi Vincent, > > On 2020/11/23 17:27, Vincent Guittot wrote: > > Hi Aubrey, > > > > On Thu, 19 Nov 2020 at 13:15, Aubrey Li wrote: > >> > >> Add idle cpumask to track idle

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-25 Thread Vincent Guittot
On Wed, 25 Nov 2020 at 03:03, Li, Aubrey wrote: > > On 2020/11/25 1:01, Vincent Guittot wrote: > > Hi Aubrey, > > > > Le mardi 24 nov. 2020 à 15:01:38 (+0800), Li, Aubrey a écrit : > >> Hi Vincent, > >> > >> On 2020/11/23 17:27, Vincent Guittot

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-25 Thread Vincent Guittot
On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) wrote: > > From: Peter Zijlstra > > Because sched_class::pick_next_task() also implies > sched_class::set_next_task() (and possibly put_prev_task() and > newidle_balance) it is not state invariant. This makes it unsuitable > for remote task se

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-26 Thread Vincent Guittot
On Wed, 25 Nov 2020 at 14:37, Li, Aubrey wrote: > > On 2020/11/25 16:31, Vincent Guittot wrote: > > On Wed, 25 Nov 2020 at 03:03, Li, Aubrey wrote: > >> > >> On 2020/11/25 1:01, Vincent Guittot wrote: > >>> Hi Aubrey, > >>> > >>

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-26 Thread Vincent Guittot
On Thu, 26 Nov 2020 at 10:35, Li, Aubrey wrote: > > On 2020/11/26 16:14, Vincent Guittot wrote: > > On Wed, 25 Nov 2020 at 14:37, Li, Aubrey wrote: > >> > >> On 2020/11/25 16:31, Vincent Guittot wrote: > >>> On Wed, 25 Nov 2020 at 03:03, Li, Aubrey >

Re: [PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-26 Thread Vincent Guittot
On Thu, 26 Nov 2020 at 10:07, Peter Zijlstra wrote: > > On Wed, Nov 25, 2020 at 05:28:36PM +0100, Vincent Guittot wrote: > > On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) > > > > +#ifdef CONFIG_SMP > > > +static struct task_str

Re: [PATCH v3] sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue

2020-12-18 Thread Vincent Guittot
1). > maybe add a Fixes: 7f65ea42eb00 ("sched/fair: Add util_est on top of PELT") > Signed-off-by: Xuewen Yan > Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot > --- > Changes since v2: > -modify the comment > -move util_est_dequeue above within_margin

Re: [RFC PATCH v2 2/2] scheduler: add scheduler level for clusters

2020-12-02 Thread Vincent Guittot
On Tue, 1 Dec 2020 at 04:04, Barry Song wrote: > > ARM64 server chip Kunpeng 920 has 6 clusters in each NUMA node, and each > cluster has 4 cpus. All clusters share L3 cache data, but each cluster > has local L3 tag. On the other hand, each clusters will share some > internal system bus. This mean

Re: [RFC PATCH v2 2/2] scheduler: add scheduler level for clusters

2020-12-02 Thread Vincent Guittot
On Wed, 2 Dec 2020 at 10:20, Song Bao Hua (Barry Song) wrote: > > > > > -Original Message- > > From: Vincent Guittot [mailto:vincent.guit...@linaro.org] > > Sent: Wednesday, December 2, 2020 9:27 PM > > To: Song Bao Hua (Barry Song) > > Cc: Valentin

Re: [sched/fair] 8d86968ac3: netperf.Throughput_tps -29.5% regression

2020-12-02 Thread Vincent Guittot
On Wed, 2 Dec 2020 at 15:30, Li, Aubrey wrote: > > Hi Mel, > > On 2020/11/26 20:13, Mel Gorman wrote: > > On Thu, Nov 26, 2020 at 02:57:07PM +0800, Li, Aubrey wrote: > >> Hi Robot, > >> > >> On 2020/11/25 17:09, kernel test robot wrote: > >>> Greeting, > >>> > >>> FYI, we noticed a -29.5% regressi

Re: [RFC PATCH v2 2/2] scheduler: add scheduler level for clusters

2020-12-03 Thread Vincent Guittot
On Wed, 2 Dec 2020 at 21:58, Song Bao Hua (Barry Song) wrote: > > > > > Sorry. Please ignore this. I added some printk here while testing > > one numa. Will update you the data in another email. > > Re-tested in one NUMA node(cpu0-cpu23): > > g=1 > Running in threaded mode with 1 groups using 40 f

Re: [RFC PATCH v2 2/2] scheduler: add scheduler level for clusters

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 10:11, Song Bao Hua (Barry Song) wrote: > > > > > -Original Message- > > From: Vincent Guittot [mailto:vincent.guit...@linaro.org] > > Sent: Thursday, December 3, 2020 10:04 PM > > To: Song Bao Hua (Barry Song) > > Cc: Valentin

Re: [RFC PATCH v2 2/2] scheduler: add scheduler level for clusters

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 10:39, Vincent Guittot wrote: > > On Thu, 3 Dec 2020 at 10:11, Song Bao Hua (Barry Song) > wrote: > > > > > > > > > -----Original Message- > > > From: Vincent Guittot [mailto:vincent.guit...@linaro.org] > > > Sent:

Re: [PATCH 04/10] sched/fair: Return an idle cpu if one is found after a failed search for an idle core

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 15:11, Mel Gorman wrote: > > select_idle_core is called when SMT is active and there is likely a free > core available. It may find idle CPUs but this information is simply > discarded and the scan starts over again with select_idle_cpu. > > This patch caches information on i

Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-03 Thread Vincent Guittot
On Thu, 3 Dec 2020 at 15:11, Mel Gorman wrote: > > The target CPU is definitely not idle in both select_idle_core and > select_idle_cpu. For select_idle_core(), the SMT is potentially > checked unnecessarily as the core is definitely not idle if the > target is busy. For select_idle_cpu(), the fir

Re: [PATCH v3 3/7] sched/fair: Add more sched_asym_cpucapacity static branch checks

2021-03-15 Thread Vincent Guittot
On Thu, 11 Mar 2021 at 13:05, Valentin Schneider wrote: > > Rik noted a while back that a handful of > > sd->flags & SD_ASYM_CPUCAPACITY > > & family in the CFS load-balancer code aren't guarded by the > sched_asym_cpucapacity static branch. guarding asym capacity with static branch in fast pat

Re: [PATCH v3 4/7] sched/fair: Introduce a CPU capacity comparison helper

2021-03-15 Thread Vincent Guittot
On Thu, 11 Mar 2021 at 13:05, Valentin Schneider wrote: > > During load-balance, groups classified as group_misfit_task are filtered > out if they do not pass > > group_smaller_max_cpu_capacity(, ); > > which itself employs fits_capacity() to compare the sgc->max_capacity of > both groups. > > D

Re: [PATCH v3 6/7] sched/fair: Filter out locally-unsolvable misfit imbalances

2021-03-15 Thread Vincent Guittot
On Thu, 11 Mar 2021 at 13:05, Valentin Schneider wrote: > > Consider the following (hypothetical) asymmetric CPU capacity topology, > with some amount of capacity pressure (RT | DL | IRQ | thermal): > > DIE [ ] > MC [][] >0 1 2 3 > > | CPU | capacity_orig | capac

Re: [PATCH 5/5] sched/fair: Merge select_idle_core/cpu()

2021-01-20 Thread Vincent Guittot
On Wed, 20 Jan 2021 at 10:12, Mel Gorman wrote: > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > > @@ -6157,18 +6169,31 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > } > > > > > > for_each_cpu_wrap(cpu, cpus, targe

Re: [PATCH 5/5] sched/fair: Merge select_idle_core/cpu()

2021-01-20 Thread Vincent Guittot
On Wed, 20 Jan 2021 at 10:54, Mel Gorman wrote: > > On Wed, Jan 20, 2021 at 10:21:47AM +0100, Vincent Guittot wrote: > > On Wed, 20 Jan 2021 at 10:12, Mel Gorman > > wrote: > > > > > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > >

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-20 Thread Vincent Guittot
Hi, On Wed, 18 Nov 2020 at 09:28, Bharata B Rao wrote: > > The page order of the slab that gets chosen for a given slab > cache depends on the number of objects that can be fit in the > slab while meeting other requirements. We start with a value > of minimum objects based on nr_cpu_ids that is d

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-21 Thread Vincent Guittot
On Thu, 21 Jan 2021 at 06:31, Bharata B Rao wrote: > > On Wed, Jan 20, 2021 at 06:36:31PM +0100, Vincent Guittot wrote: > > Hi, > > > > On Wed, 18 Nov 2020 at 09:28, Bharata B Rao wrote: > > > > > > The page order of the slab that gets chosen for a given

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-21 Thread Vincent Guittot
On Thu, 21 Jan 2021 at 11:01, Christoph Lameter wrote: > > On Thu, 21 Jan 2021, Bharata B Rao wrote: > > > > The problem is that calculate_order() is called a number of times > > > before secondaries CPUs are booted and it returns 1 instead of 224. > > > This makes the use of num_online_cpus() irr

Re: [PATCH] sched/fair: Prefer idle CPU to cache affinity

2021-03-10 Thread Vincent Guittot
On Wed, 10 Mar 2021 at 06:53, Srikar Dronamraju wrote: > > * Vincent Guittot [2021-03-08 14:52:39]: > > > On Fri, 26 Feb 2021 at 17:41, Srikar Dronamraju > > wrote: > > > > > Thanks Vincent for your review comments. > > > > +static int prefe

Re: [RFC PATCH v4 2/3] scheduler: add scheduler level for clusters

2021-03-08 Thread Vincent Guittot
On Tue, 2 Mar 2021 at 00:08, Barry Song wrote: > > ARM64 chip Kunpeng 920 has 6 or 8 clusters in each NUMA node, and each > cluster has 4 cpus. All clusters share L3 cache data, but each cluster > has local L3 tag. On the other hand, each clusters will share some > internal system bus. This means

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2021-03-08 Thread Vincent Guittot
Hi Aubrey, On Thu, 4 Mar 2021 at 14:51, Li, Aubrey wrote: > > Hi Peter, > > On 2020/12/11 23:07, Vincent Guittot wrote: > > On Thu, 10 Dec 2020 at 02:44, Aubrey Li wrote: > >> > >> Add idle cpumask to track idle cpus in sched domain. Every time > >&

Re: [PATCH] sched/fair: Prefer idle CPU to cache affinity

2021-03-08 Thread Vincent Guittot
USERS throughput 4420.64553.3 (3.00%)4405.8 > (-0.33%) > sys/user:time 79.13/20.32 78.76/21.01 79/20 > > Cc: LKML > Cc: Michael Ellerman > Cc: Michael Neuling > Cc: Gautham R Shenoy > Cc: Parth Shah > Cc: Ingo M

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-22 Thread Vincent Guittot
On Thu, 21 Jan 2021 at 19:19, Vlastimil Babka wrote: > > On 1/21/21 11:01 AM, Christoph Lameter wrote: > > On Thu, 21 Jan 2021, Bharata B Rao wrote: > > > >> > The problem is that calculate_order() is called a number of times > >> > before secondaries CPUs are booted and it returns 1 instead of 22

Re: [PATCH v3 0/5] Scan for an idle sibling in a single pass

2021-01-22 Thread Vincent Guittot
Hi Mel, On Tue, 19 Jan 2021 at 13:02, Mel Gorman wrote: > > On Tue, Jan 19, 2021 at 12:33:04PM +0100, Vincent Guittot wrote: > > On Tue, 19 Jan 2021 at 12:22, Mel Gorman > > wrote: > > > > > > Changelog since v2 > > > o Remove unnecessary param

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-22 Thread Vincent Guittot
On Fri, 22 Jan 2021 at 13:03, Vlastimil Babka wrote: > > On 1/22/21 9:03 AM, Vincent Guittot wrote: > > On Thu, 21 Jan 2021 at 19:19, Vlastimil Babka wrote: > >> > >> On 1/21/21 11:01 AM, Christoph Lameter wrote: > >> > On Thu, 21 Jan 2021, Bharata B

Re: [PATCH v3 0/5] Scan for an idle sibling in a single pass

2021-01-22 Thread Vincent Guittot
On Fri, 22 Jan 2021 at 11:14, Mel Gorman wrote: > > On Fri, Jan 22, 2021 at 10:30:52AM +0100, Vincent Guittot wrote: > > Hi Mel, > > > > On Tue, 19 Jan 2021 at 13:02, Mel Gorman > > wrote: > > > > > > On Tue, Jan 19, 2021 at 12:33:04PM +0100, Vi

Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-22 Thread Vincent Guittot
On Fri, 22 Jan 2021 at 16:46, Joel Fernandes (Google) wrote: > > On an octacore ARM64 device running ChromeOS Linux kernel v5.4, I found > that there are a lot of calls to update_blocked_averages(). This causes > the schedule loop to slow down to taking upto 500 micro seconds at > times (due to ne

Re: [PATCH V5 2/2] cpufreq: CPPC: Add support for frequency invariance

2021-03-09 Thread Vincent Guittot
e, abort */ > > + if (unlikely(!cppc_fi->cpu_data)) > > + return cppc_freq_invariance_exit(); > > + > > + ret = cppc_get_perf_ctrs(i, &fb_ctrs); > > + if (ret) { > > + pr_warn("%s: failed to read perf counters: %d\n", > > + __func__, ret); > > + return cppc_freq_invariance_exit(); > > + } > > + > > + cppc_fi->prev_perf_fb_ctrs = fb_ctrs; > > + } > > + > > + /* Register for freq-invariance */ > > + topology_set_scale_freq_source(&cppc_sftd, cpu_present_mask); > > +} > > After another very quick round of testing: > > Reviewed-by: Ionela Voinescu > Tested-by: Ionela Voinescu > > I did not get the chance to test on ThunderX2 yet, but if you are happy > with your testing on it, I won't delay this any further. I have just run some functional tests on thx2 with rt-app: I have run a periodic task (6ms running / 30ms periods) at different frequencies (2.5Ghz, 2Ghz, 1.5Ghz, 1.333Ghz, 1Ghz) and the PELT signals stays the same for all frequencies. Tested-by: Vincent Guittot > > Thanks, > Ionela.

Re: [PATCH 1/8] sched/fair: Clean up active balance nr_balance_failed trickery

2021-02-05 Thread Vincent Guittot
On Fri, 5 Feb 2021 at 15:05, Valentin Schneider wrote: > > On 05/02/21 14:51, Vincent Guittot wrote: > > On Thu, 28 Jan 2021 at 19:32, Valentin Schneider > > wrote: > >> > >> When triggering an active load balance, sd->nr_balance_failed is se

[PATCH 6/6 v2] sched/fair: reduce the window for duplicated update

2021-02-05 Thread Vincent Guittot
Start to update last_blocked_load_update_tick to reduce the possibility of another cpu starting the update one more time Signed-off-by: Vincent Guittot --- v2: - fixed compilation error for !CONFIG_NO_HZ_COMMON reported by kernel test robot kernel/sched/fair.c | 11 --- 1 file

Re: [PATCH 3/8] sched/fair: Tweak misfit-related capacity checks

2021-02-05 Thread Vincent Guittot
On Thu, 28 Jan 2021 at 19:32, Valentin Schneider wrote: > > During load-balance, groups classified as group_misfit_task are filtered > out if they do not pass > > group_smaller_max_cpu_capacity(, ); group_smaller_max_cpu_capacity and group_smaller_max_cpu_capacity are removed in the next patch

Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-25 Thread Vincent Guittot
On Fri, 22 Jan 2021 at 19:39, Qais Yousef wrote: > > On 01/22/21 17:56, Vincent Guittot wrote: > > > --- > > > kernel/sched/fair.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/kernel/sched/fair.c b/kernel/

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-26 Thread Vincent Guittot
On Tue, 26 Jan 2021 at 09:52, Michal Hocko wrote: > > On Thu 21-01-21 19:19:21, Vlastimil Babka wrote: > [...] > > We could also start questioning the very assumption that number of cpus > > should > > affect slab page size in the first place. Should it? After all, each CPU > > will > > have one

Re: [PATCH] sched/fair: add protection for delta of wait time

2021-01-17 Thread Vincent Guittot
On Sun, 17 Jan 2021 at 13:31, Jiang Biao wrote: > > From: Jiang Biao > > delta in update_stats_wait_end() might be negative, which would > make following statistics go wrong. Could you describe the use case that generates a negative delta ? rq_clock is always increasing so this should not lead

Re: [RFC PATCH] sched/fair: first try to fix the scheduling impact of NUMA diameter > 2

2021-01-18 Thread Vincent Guittot
On Fri, 15 Jan 2021 at 21:42, Barry Song wrote: > > This patch is a follow-up of the 3-hops issue reported by Valentin Schneider: > [1] https://lore.kernel.org/lkml/jhjtux5edo2.mog...@arm.com/ > [2] > https://lore.kernel.org/lkml/20201110184300.15673-1-valentin.schnei...@arm.com/ > > Here is a br

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-23 Thread Vincent Guittot
+Adding arch arm64 Maintainers On Sat, 23 Jan 2021 at 06:16, Bharata B Rao wrote: > > On Fri, Jan 22, 2021 at 01:03:57PM +0100, Vlastimil Babka wrote: > > On 1/22/21 9:03 AM, Vincent Guittot wrote: > > > On Thu, 21 Jan 2021 at 19:19, Vlastimil Babka wrote: > > &g

Re: [PATCH v2] sched/fair: check for idle core

2021-01-25 Thread Vincent Guittot
gt; > On Thu, Oct 22, 2020 at 03:15:50PM +0200, Julia Lawall wrote: > > > > > Fixes: 11f10e5420f6 ("sched/fair: Use load instead of runnable load > > > > > in wakeup path") > > > > > Signed-off-by: Julia Lawall > > > > > R

Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-25 Thread Vincent Guittot
On Fri, 22 Jan 2021 at 20:10, Joel Fernandes wrote: > > Hi Vincent, > > Thanks for reply. Please see the replies below: > > On Fri, Jan 22, 2021 at 05:56:22PM +0100, Vincent Guittot wrote: > > On Fri, 22 Jan 2021 at 16:46, Joel Fernandes (Google) > > wrote: &g

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-01-25 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 15:00, Li, Aubrey wrote: > > On 2021/1/25 18:56, Vincent Guittot wrote: > > On Mon, 25 Jan 2021 at 06:50, Aubrey Li wrote: > >> > >> A long-tail load balance cost is observed on the newly idle path, > >> this is caused by a race wi

Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-25 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 11:45, Dietmar Eggemann wrote: > > On 22/01/2021 20:10, Joel Fernandes wrote: > > Hi Vincent, > > > > Thanks for reply. Please see the replies below: > > > > On Fri, Jan 22, 2021 at 05:56:22PM +0100, Vincent Guittot wrote: > >>

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-01-25 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 06:50, Aubrey Li wrote: > > A long-tail load balance cost is observed on the newly idle path, > this is caused by a race window between the first nr_running check > of the busiest runqueue and its nr_running recheck in detach_tasks. > > Before the busiest runqueue is locked,

Re: [PATCH 3/4] sched/fair: Remove select_idle_smt()

2021-01-27 Thread Vincent Guittot
ra (Intel) > Signed-off-by: Mel Gorman Reviewed-by: Vincent Guittot > --- > kernel/sched/fair.c | 30 -- > 1 file changed, 30 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index c8d8e185cf3b..fe587350ea14 100644

Re: [PATCH 2/4] sched/fair: Move avg_scan_cost calculations under SIS_PROP

2021-01-27 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 09:59, Mel Gorman wrote: > > As noted by Vincent Guittot, avg_scan_costs are calculated for SIS_PROP > even if SIS_PROP is disabled. Move the time calculations under a SIS_PROP > check and while we are at it, exclude the cost of initialising the CPU > mask f

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 09:59, Mel Gorman wrote: > > From: Peter Zijlstra > > From: Peter Zijlstra (Intel) > > Both select_idle_core() and select_idle_cpu() do a loop over the same > cpumask. Observe that by clearing the already visited CPUs, we can > fold the iteration and iterate a core at a ti

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Wed, 27 Jan 2021 at 13:02, Mel Gorman wrote: > > On Wed, Jan 27, 2021 at 11:43:22AM +0100, Vincent Guittot wrote: > > > @@ -6149,18 +6161,31 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > } > >

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Wed, 27 Jan 2021 at 14:21, Mel Gorman wrote: > > On Wed, Jan 27, 2021 at 02:07:50PM +0100, Vincent Guittot wrote: > > > @@ -6162,18 +6162,16 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > > > >

Re: [PATCH v5 0/36] SCMI vendor protocols and modularization

2021-01-27 Thread Vincent Guittot
ry") > > Any feedback welcome. I have tested your patchset on my setup which includes: - scmi performance protocol - scmi power domain protocol - scmi clock protocol - scmi sensor protocol - scmi notification - registration of a custom scmi module (still under dev) - 2 scmi channels And

Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ

2021-01-28 Thread Vincent Guittot
Hi Joel, On Wed, 27 Jan 2021 at 19:43, Joel Fernandes wrote: > > Hi Vincent, > > On Mon, Jan 25, 2021 at 03:42:41PM +0100, Vincent Guittot wrote: > > On Fri, 22 Jan 2021 at 20:10, Joel Fernandes wrote: > > > On Fri, Jan 22, 2021 at 05:56:22PM +0100, Vincent Guittot wr

[PATCH 1/3] sched/fair: skip idle cfs_rq

2021-01-06 Thread Vincent Guittot
Don't waste time checking whether an idle cfs_rq could be the busiest queue. Furthermore, this can end up selecting a cfs_rq with a high load but being idle in case of migrate_load. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 5 - 1 file changed, 4 insertions(+), 1 del

[PATCH 0/3] Reduce number of active LB

2021-01-06 Thread Vincent Guittot
Few improvements related to active LB and the increase of LB interval. I haven't seen any performcne impact on various benchmarks except for -stress-ng mmapfork : +4.54% on my octo-core arm64 But this was somewhat expected as the changes impact mainly corner cases. Vincent Guittot (3):

[PATCH 3/3] sched/fair: reduce cases for active balance

2021-01-06 Thread Vincent Guittot
threshold on the upper limit of the task's load will decrease with the number of failed LB until the task has migrated. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/k

[PATCH 2/3] sched/fair: don't set LBF_ALL_PINNED unnecessarily

2021-01-06 Thread Vincent Guittot
Setting LBF_ALL_PINNED during active load balance is only valid when there is only 1 running task on the rq otherwise this ends up increasing the balance interval whereas other tasks could migrate after the next interval once they become cache-cold as an example. Signed-off-by: Vincent Guittot

Re: [PATCH 2/3] sched/fair: don't set LBF_ALL_PINNED unnecessarily

2021-01-06 Thread Vincent Guittot
On Wed, 6 Jan 2021 at 16:10, Peter Zijlstra wrote: > > On Wed, Jan 06, 2021 at 02:34:18PM +0100, Vincent Guittot wrote: > > Setting LBF_ALL_PINNED during active load balance is only valid when there > > is only 1 running task on the rq otherwise this ends up increasing the &g

Re: [PATCH 3/3] sched/fair: reduce cases for active balance

2021-01-06 Thread Vincent Guittot
On Wed, 6 Jan 2021 at 16:13, Peter Zijlstra wrote: > > On Wed, Jan 06, 2021 at 02:34:19PM +0100, Vincent Guittot wrote: > > Active balance is triggered for a number of voluntary case like misfit or > cases > > pinned

Re: [PATCH 2/3] sched/fair: don't set LBF_ALL_PINNED unnecessarily

2021-01-06 Thread Vincent Guittot
On Wed, 6 Jan 2021 at 16:32, Peter Zijlstra wrote: > > On Wed, Jan 06, 2021 at 04:20:55PM +0100, Vincent Guittot wrote: > > > This case here is : > > we have 2 tasks TA and TB on the rq. > > The waiting one TB can't migrate for a reason other than the pinned

Re: [PATCH 2/3] sched/fair: don't set LBF_ALL_PINNED unnecessarily

2021-01-06 Thread Vincent Guittot
On Wed, 6 Jan 2021 at 16:13, Valentin Schneider wrote: > > On 06/01/21 14:34, Vincent Guittot wrote: > > Setting LBF_ALL_PINNED during active load balance is only valid when there > > is only 1 running task on the rq otherwise this ends up increasing the > > balance inte

Re: [RFC PATCH v3 2/2] scheduler: add scheduler level for clusters

2021-01-06 Thread Vincent Guittot
utside the cluster: > target cpu > 19 -> 17 > 13 -> 15 > 23 -> 20 > 23 -> 20 > 19 -> 17 > 13 -> 15 > 16 -> 17 > 19 -> 17 > 7 -> 5 > 10 -> 11 > 23 -> 20 > *23 -> 4 > ... > > Signed-off-by: Barr

Re: [PATCH 1/1] sched/fair:Avoid unnecessary assignment to cfs_rq->on_list

2021-01-07 Thread Vincent Guittot
On Thu, 7 Jan 2021 at 02:57, wrote: > > From: jun qian > > Obviously, cfs_rq->on_list is already equal to 1 when cfs_rq->on_list > is assigned a value of 1, so an else branch is needed to avoid unnecessary > assignment operations. > > Signed-off-by: jun qian > --- > kernel/sched/fair.c | 4 ++--

[PATCH 2/3 v2] sched/fair: don't set LBF_ALL_PINNED unnecessarily

2021-01-07 Thread Vincent Guittot
set it by default. It is then cleared when we find one task that can be pulled when calling detach_tasks() or during active migration. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel

[PATCH 3/3 v2] sched/fair: reduce cases for active balance

2021-01-07 Thread Vincent Guittot
)) and the waiting task will end up to be selected after a number of attempts. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c

[PATCH 1/3 v2] sched/fair: skip idle cfs_rq

2021-01-07 Thread Vincent Guittot
Don't waste time checking whether an idle cfs_rq could be the busiest queue. Furthermore, this can end up selecting a cfs_rq with a high load but being idle in case of migrate_load. Signed-off-by: Vincent Guittot Reviewed-by: Valentin Schneider --- kernel/sched/fair.c | 5 - 1 file ch

[PATCH 0/3 v2] Reduce number of active LB

2021-01-07 Thread Vincent Guittot
tch 2: change how LBF_ALL_PINNED is managed as proposed by Valentin - patch 3: updated comment and fix typos Vincent Guittot (3): sched/fair: skip idle cfs_rq sched/fair: don't set LBF_ALL_PINNED unnecessarily sched/fair: reduce cases for active balance kernel/sched/f

Re: [RFC][PATCH 0/5] select_idle_sibling() wreckage

2020-12-16 Thread Vincent Guittot
On Wed, 16 Dec 2020 at 14:00, Li, Aubrey wrote: > > Hi Peter, > > On 2020/12/15 0:48, Peter Zijlstra wrote: > > Hai, here them patches Mel asked for. They've not (yet) been through the > > robots, so there might be some build fail for configs I've not used. > > > > Benchmark time :-) > > > > Here

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-14 Thread Vincent Guittot
On Fri, 11 Dec 2020 at 23:50, Mel Gorman wrote: > > On Fri, Dec 11, 2020 at 11:19:05PM +0100, Peter Zijlstra wrote: > > On Fri, Dec 11, 2020 at 08:43:37PM +, Mel Gorman wrote: > > > One bug is in __select_idle_core() though. It's scanning the SMT mask, > > > not select_idle_mask so it can retu

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-14 Thread Vincent Guittot
On Fri, 11 Dec 2020 at 18:45, Peter Zijlstra wrote: > > On Thu, Dec 10, 2020 at 12:58:33PM +, Mel Gorman wrote: > > The prequisite patch to make that approach work was rejected though > > as on its own, it's not very helpful and Vincent didn't like that the > > load_balance_mask was abused to

Re: [PATCH] fair/util_est: Separate util_est_dequeue() for cfs_rq_util_change

2020-12-15 Thread Vincent Guittot
On Mon, 14 Dec 2020 at 19:46, Dietmar Eggemann wrote: > > On 11/12/2020 13:03, Ryan Y wrote: > > Hi Dietmar, > > > > Yes! That's exactly what I meant. > > > >> The issue is that sugov_update_[shared\|single] -> sugov_get_util() -> > >> cpu_util_cfs() operates on an old cfs_rq->avg.util_est.enqueu

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-23 Thread Vincent Guittot
le latency. > - change clearing idle cpumask to nohz_balancer_kick(), so updating > idle cpumask is ratelimited in the idle exiting path. > - set SCHED_IDLE cpu in idle cpumask to allow it as a wakeup target. > > v1->v2: > - idle cpumask is updated in the nohz routines, by initiali

Re: [RFC] Documentation/scheduler/schedutil.txt

2020-11-23 Thread Vincent Guittot
On Mon, 23 Nov 2020 at 10:30, Dietmar Eggemann wrote: > > On 20/11/2020 09:56, Peter Zijlstra wrote: > > On Fri, Nov 20, 2020 at 08:55:27AM +0100, Peter Zijlstra wrote: > >> - In saturated scenarios task movement will cause some transient dips, > >>suppose we have a CPU saturated with 4 tasks

Re: [RFC][PATCH v5 01/14] sched: add a new arch_sd_local_flags for sched_domain init

2013-11-05 Thread Vincent Guittot
On 5 November 2013 15:06, Peter Zijlstra wrote: > On Fri, Oct 18, 2013 at 01:52:15PM +0200, Vincent Guittot wrote: >> The function arch_sd_local_flags is used to set flags in sched_domains >> according to the platform architecture. A new flag SD_SHARE_POWERDOMAIN is >> al

Re: [RFC][PATCH v5 01/14] sched: add a new arch_sd_local_flags for sched_domain init

2013-11-06 Thread Vincent Guittot
On 5 November 2013 23:27, Peter Zijlstra wrote: > On Tue, Nov 05, 2013 at 03:57:23PM +0100, Vincent Guittot wrote: >> Your proposal looks fine for me. It's clearly better to move in one >> place the configuration of sched_domain fields. Have you already got >>

Bench for testing scheduler

2013-11-07 Thread Vincent Guittot
Hi, During the Energy-aware scheduling mini-summit, we spoke about benches that should be used to evaluate the modifications of the scheduler. I’d like to propose a bench that uses cyclictest to measure the wake up latency and the power consumption. The goal of this bench is to exercise the schedu

Re: Bench for testing scheduler

2013-11-07 Thread Vincent Guittot
> > > On Thu, Nov 07, 2013 at 10:54:30AM +0000, Vincent Guittot wrote: >> During the Energy-aware scheduling mini-summit, we spoke about benches >> that should be used to evaluate the modifications of the scheduler. >> I’d like to propose a bench that uses cyclictest to me

Re: [RFC 4/6] sched: powerpc: create a dedicated topology table

2014-03-12 Thread Vincent Guittot
On 12 March 2014 05:42, Preeti U Murthy wrote: > On 03/11/2014 06:48 PM, Vincent Guittot wrote: >> On 11 March 2014 11:08, Preeti U Murthy wrote: >>> Hi Vincent, >>> >>> On 03/05/2014 12:48 PM, Vincent Guittot wrote: >>>> Create a dedicated topolog

Re: [PATCH] sched: fix: remove double calculation in fix_small_imbalance

2014-03-12 Thread Vincent Guittot
On 12 March 2014 10:00, Peter Zijlstra wrote: > On Tue, Mar 11, 2014 at 05:26:06PM +0100, Vincent Guittot wrote: >> The tmp value has been already calculated in: >> scaled_busy_load_per_task = >> (busiest->load_per_task * SCHED_POWER_SCALE) / >>

Re: [RFC 0/6] rework sched_domain topology description

2014-03-12 Thread Vincent Guittot
On 12 March 2014 14:28, Dietmar Eggemann wrote: > On 11/03/14 13:17, Peter Zijlstra wrote: >> On Sat, Mar 08, 2014 at 12:40:58PM +, Dietmar Eggemann wrote: I don't have a strong opinion about using or not a cpu argument for setting the flags of a level (it was part of the initia

[RFC 0/6] rework sched_domain topology description

2014-03-04 Thread Vincent Guittot
/2013/11/5/239 [3] https://lkml.org/lkml/2013/11/5/449 Vincent Guittot (6): sched: remove unused SCHED_INIT_NODE sched: rework of sched_domain topology definition sched: s390: create a dedicated topology table sched: powerpc: create a dedicated topology table sched: add

[RFC 3/6] sched: s390: create a dedicated topology table

2014-03-04 Thread Vincent Guittot
BOOK level is only relevant for s390 so we create a dedicated topology table with BOOK level and remove it from default table. Signed-off-by: Vincent Guittot --- arch/s390/include/asm/topology.h | 11 +-- arch/s390/kernel/topology.c | 25 + kernel/sched

[RFC 6/6] sched: ARM: create a dedicated scheduler topology table

2014-03-04 Thread Vincent Guittot
Create a dedicated topology table for ARM which will create new level to differentiate CPUs that can or not powergate independantly from others. The patch gives an example of how to add domain that will take advantage of SD_SHARE_POWERDOMAIN. Signed-off-by: Vincent Guittot --- arch/arm/kernel

[RFC 4/6] sched: powerpc: create a dedicated topology table

2014-03-04 Thread Vincent Guittot
SD_ASYM_PACKING in the sd_flags of SMT level during the boot sequence and before the build of the sched_domain topology. Signed-off-by: Vincent Guittot --- arch/powerpc/kernel/smp.c | 35 +++ kernel/sched/core.c |6 -- 2 files changed, 27 insertions

[RFC 5/6] sched: add a new SD_SHARE_POWERDOMAIN for sched_domain

2014-03-04 Thread Vincent Guittot
balancing level between group of CPUs than can power gate independantly. The default behavior of the scheduler is to spread tasks across CPUs and groups of CPUs so the flag is set into all sched_domains. Signed-off-by: Vincent Guittot --- include/linux/sched.h |1 + kernel/sched/core.c |9

[PATCH 2/6] sched: rework of sched_domain topology definition

2014-03-04 Thread Vincent Guittot
build sequence of the sched_domain will take care of removing useless levels like those with 1 CPU and those with the same CPU span and relevant information for load balancing than its child . Signed-off-by: Vincent Guittot --- arch/ia64/include/asm/topology.h | 24 arch/s390/include/asm/topol

[RFC 1/6] sched: remove unused SCHED_INIT_NODE

2014-03-04 Thread Vincent Guittot
not used since new numa scheduler init sequence Signed-off-by: Vincent Guittot --- arch/metag/include/asm/topology.h | 27 --- 1 file changed, 27 deletions(-) diff --git a/arch/metag/include/asm/topology.h b/arch/metag/include/asm/topology.h index 8e9c0b3..e95f874

Re: [PATCH 2/6] sched: rework of sched_domain topology definition

2014-03-06 Thread Vincent Guittot
On 6 March 2014 01:09, Dietmar Eggemann wrote: > On 05/03/14 07:18, Vincent Guittot wrote: >> >> We replace the old way to configure the scheduler topology with a new >> method >> which enables a platform to declare additionnal level (if needed). >> >>

Re: [RFC 6/6] sched: ARM: create a dedicated scheduler topology table

2014-03-06 Thread Vincent Guittot
On 6 March 2014 06:38, Dietmar Eggemann wrote: > On 05/03/14 07:18, Vincent Guittot wrote: >> Create a dedicated topology table for ARM which will create new level to >> differentiate CPUs that can or not powergate independantly from others. >> >> The patch gives an e

Re: [RFC 0/6] rework sched_domain topology description

2014-03-06 Thread Vincent Guittot
On 6 March 2014 07:17, Dietmar Eggemann wrote: > On 05/03/14 07:18, Vincent Guittot wrote: >> >> This patchset was previously part of the larger tasks packing patchset >> [1]. >> I have splitted the latter in 3 different patchsets (at least) to make the >> t

[PATCH v2 1/7] sched: remove unused SCHED_INIT_NODE

2014-03-18 Thread Vincent Guittot
not used since new numa scheduler init sequence Signed-off-by: Vincent Guittot --- arch/metag/include/asm/topology.h | 27 --- 1 file changed, 27 deletions(-) diff --git a/arch/metag/include/asm/topology.h b/arch/metag/include/asm/topology.h index 8e9c0b3..e95f874

[PATCH v2 3/7] sched: s390: create a dedicated topology table

2014-03-18 Thread Vincent Guittot
BOOK level is only relevant for s390 so we create a dedicated topology table with BOOK level and remove it from default table. Signed-off-by: Vincent Guittot --- arch/s390/include/asm/topology.h | 11 +-- arch/s390/kernel/topology.c | 20 kernel/sched/core.c

[PATCH v2 6/7] sched: ARM: create a dedicated scheduler topology table

2014-03-18 Thread Vincent Guittot
Create a dedicated topology table for ARM which will create new level to differentiate CPUs that can or not powergate independantly from others. The patch gives an example of how to add domain that will take advantage of SD_SHARE_POWERDOMAIN. Signed-off-by: Vincent Guittot --- arch/arm/kernel

[PATCH v2 0/7] rework sched_domain topology description

2014-03-18 Thread Vincent Guittot
rpc's SMT level Vincent Guittot (7): sched: remove unused SCHED_INIT_NODE sched: rework of sched_domain topology definition sched: s390: create a dedicated topology table sched: powerpc: create a dedicated topology table sched: add a new SD_SHARE_POWERDOMAIN for sched_domain sched: A

[PATCH v2 7/7] sched: powerpc: Add SD_SHARE_POWERDOMAIN for SMT level

2014-03-18 Thread Vincent Guittot
Set the power domain dependency at SMT level of Power8 but keep the flag clear at CPU level. The goal is to consolidate tasks on the threads of a core up to a level as decribed in the link below: https://lkml.org/lkml/2014/3/12/16 Signed-off-by: Vincent Guittot --- arch/powerpc/kernel/smp.c | 2

[PATCH v2 5/7] sched: add a new SD_SHARE_POWERDOMAIN for sched_domain

2014-03-18 Thread Vincent Guittot
balancing level between group of CPUs than can power gate independantly. The default behavior of the scheduler is to spread tasks across CPUs and groups of CPUs so the flag is set into all sched_domains. This flag is part of the topology flags that can be set by arch. Signed-off-by: Vincent Guittot

[PATCH v2 2/7] sched: rework of sched_domain topology definition

2014-03-18 Thread Vincent Guittot
U and those with the same CPU span and relevant information for load balancing than its child. Signed-off-by: Vincent Guittot --- arch/ia64/include/asm/topology.h | 24 arch/s390/include/asm/topology.h | 2 - arch/tile/include/asm/topology.h | 33 -- include/linux/sched.h

[PATCH v2 4/7] sched: powerpc: create a dedicated topology table

2014-03-18 Thread Vincent Guittot
Create a dedicated topology table for handling asymetric feature of powerpc. Signed-off-by: Vincent Guittot --- arch/powerpc/kernel/smp.c | 31 +++ include/linux/sched.h | 2 -- kernel/sched/core.c | 6 -- 3 files changed, 23 insertions(+), 16

Re: [PATCH v2 5/7] sched: add a new SD_SHARE_POWERDOMAIN for sched_domain

2014-03-19 Thread Vincent Guittot
On 19 March 2014 07:21, Preeti U Murthy wrote: > Hi Vincent, > > On 03/18/2014 11:26 PM, Vincent Guittot wrote: >> A new flag SD_SHARE_POWERDOMAIN is created to reflect whether groups of CPUs >> in a sched_domain level can or not reach different power state. As an >>

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