lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 4 Dec 2021 10:14:02 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Tim Chen <tim.c.chen@...ux.intel.com>
Cc:     Arjan Van De Ven <arjan.van.de.ven@...el.com>,
        Ricardo Neri <ricardo.neri@...el.com>,
        Len Brown <len.brown@...el.com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
        Chen Yu <yu.c.chen@...el.com>,
        Song Bao Hua <song.bao.hua@...ilicon.com>,
        yangyicong <yangyicong@...wei.com>,
        Michael Larabel <Michael@...haelLarabel.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] Make Cluster Scheduling Configurable

On Fri, Dec 03, 2021 at 12:32:37PM -0800, Tim Chen wrote:
> Tim Chen (5):
>   scheduler: Create SDTL_SKIP flag to skip topology level
>   scheduler: Add SD_CLUSTER topology flag to cluster sched domain
>   scheduler: Add runtime knob sysctl_sched_cluster
>   scheduler: Add boot time enabling/disabling of cluster scheduling
>   scheduler: Default cluster scheduling to off on x86 hybrid CPU

s/scheduler:/sched:/, surely?

>  .../admin-guide/kernel-parameters.txt         |  4 +
>  arch/x86/kernel/smpboot.c                     | 26 +++++++
>  drivers/base/arch_topology.c                  | 23 +++++-
>  include/linux/sched/sd_flags.h                |  7 ++
>  include/linux/sched/sysctl.h                  |  6 ++
>  include/linux/sched/topology.h                |  3 +-
>  include/linux/topology.h                      |  7 ++
>  kernel/sched/core.c                           |  1 +
>  kernel/sched/sched.h                          |  6 ++
>  kernel/sched/topology.c                       | 75 ++++++++++++++++++-
>  kernel/sysctl.c                               | 11 +++
>  11 files changed, 163 insertions(+), 6 deletions(-)

*groan*,... I was more thinking of something like so.

---
 arch/x86/kernel/smpboot.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index ac2909f0cab3..617012f4619f 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -579,6 +579,17 @@ static struct sched_domain_topology_level x86_numa_in_package_topology[] = {
 	{ NULL, },
 };
 
+static struct sched_domain_topology_level x86_hybrid_topology[] = {
+#ifdef CONFIG_SCHED_SMT
+	{ cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) },
+#endif
+#ifdef CONFIG_SCHED_MC
+	{ cpu_coregroup_mask, x86_core_flags, SD_INIT_NAME(MC) },
+#endif
+	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ NULL, },
+};
+
 static struct sched_domain_topology_level x86_topology[] = {
 #ifdef CONFIG_SCHED_SMT
 	{ cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) },
@@ -1469,8 +1480,11 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
 
 	calculate_max_logical_packages();
 
+	/* XXX for now assume numa-in-package and hybrid don't overlap */
 	if (x86_has_numa_in_package)
 		set_sched_topology(x86_numa_in_package_topology);
+	if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
+		set_sched_topology(x86_hybrid_topology);
 
 	nmi_selftest();
 	impress_friends();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ