Re: [PATCH 00/10] sched/fair: wake_affine improvements

From: Srikar Dronamraju
Date: Wed Apr 28 2021 - 08:50:14 EST


* Vincent Guittot <vincent.guittot@xxxxxxxxxx> [2021-04-27 16:52:30]:

> Hi Srikar,

Hi Vincent,

> On Thu, 22 Apr 2021 at 12:23, Srikar Dronamraju
> <srikar@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Recently we found that some of the benchmark numbers on Power10 were lesser
> > than expected. Some analysis showed that the problem lies in the fact that
> > L2-Cache on Power10 is at core level i.e only 4 threads share the L2-cache.
> >
> >
> > Summary:
> > mc-llc outperforms, this patchset and upstream almost give similar performance.
>
> So mc-llc patch seems to be the best approach IMHO. Although the
> hemisphere don't share cache, they share enough resources so
> cache-snooping is as efficient as sharing cache
>

Yes, mc-llc helps just specific systems like Power10 but its shows better
numbers than my posted patchset.

However in this patchset, we are looking at areas in wakeup (aka idler llcs)
we could optimize which can help other archs too. + the fallback mechanism
is generic enough that we could use it for other Systems too.

I know that there are valid concerns raised by Mel and I working to resolve
them. Some of them are.
- How hot is idle-core
- Crashes when running tbench (I was able to reproduce with kernbench on x86)

Also I am adding some more changes with which we are getting similar
performance as mc-llc.

> > Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>
> > Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> > Cc: Gautham R Shenoy <ego@xxxxxxxxxxxxxxxxxx>
> > Cc: Parth Shah <parth@xxxxxxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Valentin Schneider <valentin.schneider@xxxxxxx>
> > Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> > Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
> > Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> > Cc: Rik van Riel <riel@xxxxxxxxxxx>
> >
> > Srikar Dronamraju (10):
> > sched/fair: Update affine statistics when needed
> > sched/fair: Maintain the identity of idle-core
> > sched/fair: Update idle-core more often
> > sched/fair: Prefer idle CPU to cache affinity
> > sched/fair: Call wake_affine only if necessary
> > sched/idle: Move busy_cpu accounting to idle callback
> > sched/fair: Remove ifdefs in waker_affine_idler_llc
> > sched/fair: Dont iterate if no idle CPUs
> > sched/topology: Introduce fallback LLC
> > powerpc/smp: Add fallback flag to powerpc MC domain
> >
> > arch/powerpc/kernel/smp.c | 7 +-
> > include/linux/sched/sd_flags.h | 7 +
> > include/linux/sched/topology.h | 3 +-
> > kernel/sched/fair.c | 229 +++++++++++++++++++++++++++------
> > kernel/sched/features.h | 1 +
> > kernel/sched/idle.c | 33 ++++-
> > kernel/sched/sched.h | 6 +
> > kernel/sched/topology.c | 54 +++++++-
> > 8 files changed, 296 insertions(+), 44 deletions(-)
> >
> > --
> > 2.18.2
> >

--
Thanks and Regards
Srikar Dronamraju