All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>,
	Ricardo Neri <ricardo.neri@intel.com>,
	Len Brown <len.brown@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	Chen Yu <yu.c.chen@intel.com>,
	Song Bao Hua <song.bao.hua@hisilicon.com>,
	yangyicong <yangyicong@huawei.com>,
	Michael Larabel <Michael@MichaelLarabel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] Make Cluster Scheduling Configurable
Date: Tue, 07 Dec 2021 07:49:23 -0800	[thread overview]
Message-ID: <e774c2abc7f2e016db8e3c8b7117e2bad1488d23.camel@linux.intel.com> (raw)
In-Reply-To: <20211204091402.GM16608@worktop.programming.kicks-ass.net>

On Sat, 2021-12-04 at 10:14 +0100, Peter Zijlstra wrote:
> 
> 

Peter,

If you wish, you can use the following change log for your
abbreviated patch.

---

sched: Don't use cluster topology for x86 hybrid CPUs

For x86 hybrid CPUs like Alder Lake, the order of CPU selection should
be based strictly on CPU priority.  Don't include cluster topology for
hybrid CPUs to avoid interference with such CPU selection order.

On Alder Lake, the Atom CPU cluster has more capacity (4 Atom CPUs) 
vs Big core cluster (2 hyperthread CPUs). This could potentially 
bias CPU selection towards Atom over Big Core, when Big core
CPU has higher priority. 

---

Thanks.

Acked-by: Tim Chen <tim.c.chen@linux.intel.com>

Tim

> ---
>  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();


  parent reply	other threads:[~2021-12-07 15:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 20:32 [PATCH 0/5] Make Cluster Scheduling Configurable Tim Chen
2021-12-03 20:32 ` [PATCH 1/5] scheduler: Create SDTL_SKIP flag to skip topology level Tim Chen
2021-12-03 20:32 ` [PATCH 2/5] scheduler: Add SD_CLUSTER topology flag to cluster sched domain Tim Chen
2021-12-03 20:32 ` [PATCH 3/5] scheduler: Add runtime knob sysctl_sched_cluster Tim Chen
2021-12-03 20:32 ` [PATCH 4/5] scheduler: Add boot time enabling/disabling of cluster scheduling Tim Chen
2021-12-04  6:47   ` Yicong Yang
2021-12-03 20:32 ` [PATCH 5/5] scheduler: Default cluster scheduling to off on x86 hybrid CPU Tim Chen
2021-12-04  9:14 ` [PATCH 0/5] Make Cluster Scheduling Configurable Peter Zijlstra
2021-12-06 18:42   ` Tim Chen
2021-12-06 22:05   ` Ricardo Neri
2021-12-07 15:49   ` Tim Chen [this message]
2021-12-08 21:27   ` [tip: sched/urgent] sched,x86: Don't use cluster topology for x86 hybrid CPUs tip-bot2 for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e774c2abc7f2e016db8e3c8b7117e2bad1488d23.camel@linux.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --cc=Michael@MichaelLarabel.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=ricardo.neri@intel.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=yangyicong@huawei.com \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.