[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230911231624.GA16338@ranerica-svr.sc.intel.com>
Date: Mon, 11 Sep 2023 16:16:24 -0700
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: "Peter Zijlstra (Intel)" <peterz@...radead.org>
Cc: "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Ricardo Neri <ricardo.neri@...el.com>,
Ben Segall <bsegall@...gle.com>,
Caleb Callaway <caleb.callaway@...el.com>,
Chen Yu <yu.c.chen@...el.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Len Brown <len.brown@...el.com>, Mel Gorman <mgorman@...e.de>,
Steven Rostedt <rostedt@...dmis.org>,
"Tim C . Chen" <tim.c.chen@...el.com>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/sched: Restore the SD_ASYM_PACKING flag in the DIE
domain
On Mon, Aug 14, 2023 at 08:57:47PM -0700, Ricardo Neri wrote:
> Commit 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup") dropped the
> SD_ASYM_PACKING flag in the DIE domain added in commit 044f0e27dec6
> ("x86/sched: Add the SD_ASYM_PACKING flag to the die domain of hybrid
> processors"). Restore it on hybrid processors.
>
> The die-level domain does not depend on any build configuration and now
> x86_sched_itmt_flags() is always needed. Remove the build dependency on
> CONFIG_SCHED_[SMT|CLUSTER|MC].
>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Caleb Callaway <caleb.callaway@...el.com>
> Cc: Chen Yu <yu.c.chen@...el.com>
> Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Len Brown <len.brown@...el.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Tim C. Chen <tim.c.chen@...el.com>
> Cc: Valentin Schneider <vschneid@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: x86@...nel.org
> Cc: linux-kernel@...r.kernel.org
> Fixes: 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup")
> Reviewed-by: Chen Yu <yu.c.chen@...el.com>
> Tested-by: Caleb Callaway <caleb.callaway@...el.com>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
> ---
> arch/x86/kernel/smpboot.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index d7667a29acf3..944008c72754 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -579,7 +579,6 @@ static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> }
>
>
> -#if defined(CONFIG_SCHED_SMT) || defined(CONFIG_SCHED_CLUSTER) || defined(CONFIG_SCHED_MC)
> static inline int x86_sched_itmt_flags(void)
> {
> return sysctl_sched_itmt_enabled ? SD_ASYM_PACKING : 0;
> @@ -603,7 +602,12 @@ static int x86_cluster_flags(void)
> return cpu_cluster_flags() | x86_sched_itmt_flags();
> }
> #endif
> -#endif
> +
> +static int x86_die_flags(void)
> +{
> + return cpu_feature_enabled(X86_FEATURE_HYBRID_CPU) ?
> + x86_sched_itmt_flags() : 0;
> +}
>
> /*
> * Set if a package/die has multiple NUMA nodes inside.
> @@ -640,7 +644,7 @@ static void __init build_sched_topology(void)
> */
> if (!x86_has_numa_in_package) {
> x86_topology[i++] = (struct sched_domain_topology_level){
> - cpu_cpu_mask, SD_INIT_NAME(DIE)
> + cpu_cpu_mask, x86_die_flags, SD_INIT_NAME(DIE)
> };
> }
>
Hi, just checking if there are any comments on this patch?
Powered by blists - more mailing lists