linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters
@ 2021-09-24  8:51 Barry Song
  2021-09-24  8:51 ` [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die Barry Song
                   ` (3 more replies)
  0 siblings, 4 replies; 46+ messages in thread
From: Barry Song @ 2021-09-24  8:51 UTC (permalink / raw)
  To: dietmar.eggemann, linux-kernel, mingo, peterz, vincent.guittot
  Cc: aubrey.li, bp, bristot, bsegall, catalin.marinas, gregkh,
	guodong.xu, hpa, jonathan.cameron, juri.lelli, lenb, linux-acpi,
	linux-arm-kernel, linuxarm, mark.rutland, mgorman, msys.mizuma,
	prime.zeng, rjw, rostedt, song.bao.hua, sudeep.holla, tglx,
	rafael, tim.c.chen, valentin.schneider, will, x86, yangyicong

From: Barry Song <song.bao.hua@hisilicon.com>

ARM64 machines like kunpeng920 and x86 machines like Jacobsville have a
level of hardware topology in which some CPU cores, typically 4 cores,
share L3 tags or L2 cache.

That means spreading those tasks between clusters will bring more memory
bandwidth and decrease cache contention. But packing tasks might help
decrease the latency of cache synchronization.

We have three series to bring up cluster level scheduler in kernel.
This is the first series.

1st series(this one): make kernel aware of cluster, expose cluster to sysfs
ABI and add SCHED_CLUSTER which can make load balance between clusters to
benefit lots of workload.
Testing shows this can hugely boost the performance, for example, this
can increase 25.1% of SPECrate mcf on Jacobsville and 13.574% of mcf
on kunpeng920.

2nd series(wake_affine): modify the wake_affine and let kernel select CPUs
within cluster first before scanning the whole LLC so that we can benefit
from the lower latency of cache coherence within one single cluster. This
series is much more tricky. so we would like to send it after we build
the base of cluster by the 1st series. Prototype for 2nd series is here:
https://op-lists.linaro.org/pipermail/linaro-open-discussions/2021-June/000219.html

3rd series: a sysctl to permit users to enable or disable cluster scheduler
from Tim Chen. Prototype here:
Add run time sysctl to enable/disable cluster scheduling
https://op-lists.linaro.org/pipermail/linaro-open-discussions/2021-July/000258.html

This series is resent and rebased on 5.15-rc2.

-V1:
 differences with RFC v6 
 * removed wake_affine path modifcation, which will be separately second series
 * cluster_id is gotten by detecting valid ID before falling back to use offset
 * lots of benchmark data from both x86 Jacobsville and ARM64 kunpeng920

-RFC v6:
https://lore.kernel.org/lkml/20210420001844.9116-1-song.bao.hua@hisilicon.com/

Barry Song (1):
  scheduler: Add cluster scheduler level in core and related Kconfig for
    ARM64

Jonathan Cameron (1):
  topology: Represent clusters of CPUs within a die

Tim Chen (1):
  scheduler: Add cluster scheduler level for x86

 Documentation/ABI/stable/sysfs-devices-system-cpu | 15 +++++
 Documentation/admin-guide/cputopology.rst         | 12 ++--
 arch/arm64/Kconfig                                |  7 +++
 arch/arm64/kernel/topology.c                      |  2 +
 arch/x86/Kconfig                                  |  8 +++
 arch/x86/include/asm/smp.h                        |  7 +++
 arch/x86/include/asm/topology.h                   |  3 +
 arch/x86/kernel/cpu/cacheinfo.c                   |  1 +
 arch/x86/kernel/cpu/common.c                      |  3 +
 arch/x86/kernel/smpboot.c                         | 44 ++++++++++++++-
 drivers/acpi/pptt.c                               | 67 +++++++++++++++++++++++
 drivers/base/arch_topology.c                      | 14 +++++
 drivers/base/topology.c                           | 10 ++++
 include/linux/acpi.h                              |  5 ++
 include/linux/arch_topology.h                     |  5 ++
 include/linux/sched/topology.h                    |  7 +++
 include/linux/topology.h                          | 13 +++++
 kernel/sched/topology.c                           |  5 ++
 18 files changed, 223 insertions(+), 5 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2021-10-22 13:38 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24  8:51 [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters Barry Song
2021-09-24  8:51 ` [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die Barry Song
2021-10-05 16:33   ` Valentin Schneider
2021-10-05 20:43     ` Barry Song
2021-10-06 10:50       ` Barry Song
2021-10-06 12:18         ` Peter Zijlstra
2021-10-06 12:50           ` Barry Song
2021-10-06 13:55             ` Peter Zijlstra
2021-10-07 10:30               ` Barry Song
2021-10-07 10:35                 ` Peter Zijlstra
2021-10-06 13:49       ` Valentin Schneider
2021-10-15  9:44   ` [tip: sched/core] " tip-bot2 for Jonathan Cameron
2021-09-24  8:51 ` [PATCH RESEND 2/3] scheduler: Add cluster scheduler level in core and related Kconfig for ARM64 Barry Song
2021-10-05  7:35   ` Peter Zijlstra
2021-10-05  9:01     ` Barry Song
2021-10-05 10:40       ` Peter Zijlstra
2021-09-24  8:51 ` [PATCH RESEND 3/3] scheduler: Add cluster scheduler level for x86 Barry Song
2021-10-15  9:44   ` [tip: sched/core] sched: " tip-bot2 for Tim Chen
2021-10-20 13:12     ` Tom Lendacky
2021-10-20 19:51       ` Peter Zijlstra
2021-10-20 20:08         ` Tom Lendacky
2021-10-20 20:25           ` Peter Zijlstra
2021-10-20 20:36             ` Peter Zijlstra
2021-10-20 20:40               ` Tom Lendacky
2021-10-20 20:40               ` Peter Zijlstra
2021-10-20 20:51                 ` Tom Lendacky
2021-10-21 10:32                 ` Barry Song
2021-10-21 10:54                   ` Barry Song
2021-10-21 13:22                   ` Peter Zijlstra
2021-10-21 22:23                     ` Song Bao Hua (Barry Song)
2021-10-22 13:31                 ` Tom Lendacky
2021-10-22 13:36                   ` Peter Zijlstra
2021-10-01 10:32 ` [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters Barry Song
2021-10-01 10:39   ` Vincent Guittot
2021-10-01 14:57     ` Peter Zijlstra
2021-10-01 23:22       ` Tim Chen
2021-10-02  7:09         ` Barry Song
2021-10-04 22:54           ` Tim Chen
2021-10-05  7:54             ` Peter Zijlstra
2021-10-05  8:04           ` Peter Zijlstra
2021-10-05  9:06             ` Barry Song
2021-10-05  7:50         ` Peter Zijlstra
2021-10-05  9:15           ` Barry Song
2021-10-05 10:58             ` Peter Zijlstra
2021-10-05 13:42           ` Valentin Schneider
2021-10-05 13:50             ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).