All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Barry Song <song.bao.hua@hisilicon.com>,
	catalin.marinas@arm.com, will@kernel.org, rjw@rjwysocki.net,
	vincent.guittot@linaro.org, bp@alien8.de, tglx@linutronix.de,
	mingo@redhat.com, lenb@kernel.org, peterz@infradead.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de
Cc: msys.mizuma@gmail.com, valentin.schneider@arm.com,
	gregkh@linuxfoundation.org, jonathan.cameron@huawei.com,
	juri.lelli@redhat.com, mark.rutland@arm.com,
	sudeep.holla@arm.com, aubrey.li@linux.intel.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	x86@kernel.org, xuwei5@huawei.com, prime.zeng@hisilicon.com,
	guodong.xu@linaro.org, yangyicong@huawei.com,
	liguozhu@hisilicon.com, linuxarm@openeuler.org, hpa@zytor.com
Subject: Re: [RFC PATCH v5 4/4] scheduler: Add cluster scheduler level for x86
Date: Tue, 23 Mar 2021 15:50:49 -0700	[thread overview]
Message-ID: <110234d1-22ce-8a9a-eabb-c15ac29a5dcd@linux.intel.com> (raw)
In-Reply-To: <20210319041618.14316-5-song.bao.hua@hisilicon.com>



On 3/18/21 9:16 PM, Barry Song wrote:
> From: Tim Chen <tim.c.chen@linux.intel.com>
> 
> There are x86 CPU architectures (e.g. Jacobsville) where L2 cahce
> is shared among a cluster of cores instead of being exclusive
> to one single core.
> 
> To prevent oversubscription of L2 cache, load should be
> balanced between such L2 clusters, especially for tasks with
> no shared data.
> 
> Also with cluster scheduling policy where tasks are woken up
> in the same L2 cluster, we will benefit from keeping tasks
> related to each other and likely sharing data in the same L2
> cluster.
> 
> Add CPU masks of CPUs sharing the L2 cache so we can build such
> L2 cluster scheduler domain.
> 
> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>


Barry,

Can you also add this chunk to the patch.
Thanks.

Tim


diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 2a11ccc14fb1..800fa48c9fcd 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -115,6 +115,7 @@ extern unsigned int __max_die_per_package;
 
 #ifdef CONFIG_SMP
 #define topology_die_cpumask(cpu)		(per_cpu(cpu_die_map, cpu))
+#define topology_cluster_cpumask(cpu)		(cpu_clustergroup_mask(cpu))
 #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
 #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
 

WARNING: multiple messages have this Message-ID (diff)
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Barry Song <song.bao.hua@hisilicon.com>,
	catalin.marinas@arm.com, will@kernel.org, rjw@rjwysocki.net,
	vincent.guittot@linaro.org, bp@alien8.de, tglx@linutronix.de,
	mingo@redhat.com, lenb@kernel.org, peterz@infradead.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de
Cc: msys.mizuma@gmail.com, valentin.schneider@arm.com,
	gregkh@linuxfoundation.org, jonathan.cameron@huawei.com,
	juri.lelli@redhat.com, mark.rutland@arm.com,
	sudeep.holla@arm.com, aubrey.li@linux.intel.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	x86@kernel.org, xuwei5@huawei.com, prime.zeng@hisilicon.com,
	guodong.xu@linaro.org, yangyicong@huawei.com,
	liguozhu@hisilicon.com, linuxarm@openeuler.org, hpa@zytor.com
Subject: Re: [RFC PATCH v5 4/4] scheduler: Add cluster scheduler level for x86
Date: Tue, 23 Mar 2021 15:50:49 -0700	[thread overview]
Message-ID: <110234d1-22ce-8a9a-eabb-c15ac29a5dcd@linux.intel.com> (raw)
In-Reply-To: <20210319041618.14316-5-song.bao.hua@hisilicon.com>



On 3/18/21 9:16 PM, Barry Song wrote:
> From: Tim Chen <tim.c.chen@linux.intel.com>
> 
> There are x86 CPU architectures (e.g. Jacobsville) where L2 cahce
> is shared among a cluster of cores instead of being exclusive
> to one single core.
> 
> To prevent oversubscription of L2 cache, load should be
> balanced between such L2 clusters, especially for tasks with
> no shared data.
> 
> Also with cluster scheduling policy where tasks are woken up
> in the same L2 cluster, we will benefit from keeping tasks
> related to each other and likely sharing data in the same L2
> cluster.
> 
> Add CPU masks of CPUs sharing the L2 cache so we can build such
> L2 cluster scheduler domain.
> 
> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>


Barry,

Can you also add this chunk to the patch.
Thanks.

Tim


diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 2a11ccc14fb1..800fa48c9fcd 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -115,6 +115,7 @@ extern unsigned int __max_die_per_package;
 
 #ifdef CONFIG_SMP
 #define topology_die_cpumask(cpu)		(per_cpu(cpu_die_map, cpu))
+#define topology_cluster_cpumask(cpu)		(cpu_clustergroup_mask(cpu))
 #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
 #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-03-23 22:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  4:16 [RFC PATCH v5 0/4] scheduler: expose the topology of clusters and add cluster scheduler Barry Song
2021-03-19  4:16 ` Barry Song
2021-03-19  4:16 ` [RFC PATCH v5 1/4] topology: Represent clusters of CPUs within a die Barry Song
2021-03-19  4:16   ` Barry Song
2021-03-19  6:35   ` Greg KH
2021-03-19  6:35     ` Greg KH
2021-03-19  6:57     ` Song Bao Hua (Barry Song)
2021-03-19  6:57       ` Song Bao Hua (Barry Song)
2021-03-19  9:36       ` Jonathan Cameron
2021-03-19  9:36         ` Jonathan Cameron
2021-03-19 10:01         ` Greg KH
2021-03-19 10:01           ` Greg KH
2021-04-20  3:30           ` Song Bao Hua (Barry Song)
2021-04-20  3:30             ` Song Bao Hua (Barry Song)
2021-04-21  4:06           ` Song Bao Hua (Barry Song)
2021-04-21  4:06             ` Song Bao Hua (Barry Song)
2021-03-19  4:16 ` [RFC PATCH v5 2/4] scheduler: add scheduler level for clusters Barry Song
2021-03-19  4:16   ` Barry Song
2021-03-19  4:16 ` [RFC PATCH v5 3/4] scheduler: scan idle cpu in cluster before scanning the whole llc Barry Song
2021-03-19  4:16   ` Barry Song
2021-03-19 21:39   ` Song Bao Hua (Barry Song)
2021-03-19 21:39     ` Song Bao Hua (Barry Song)
2021-03-19  4:16 ` [RFC PATCH v5 4/4] scheduler: Add cluster scheduler level for x86 Barry Song
2021-03-19  4:16   ` Barry Song
2021-03-23 22:50   ` Tim Chen [this message]
2021-03-23 22:50     ` Tim Chen
2021-03-23 23:21     ` Song Bao Hua (Barry Song)
2021-03-23 23:21       ` Song Bao Hua (Barry Song)
2021-04-20 18:31       ` Tim Chen
2021-04-20 18:31         ` Tim Chen
2021-04-20 22:31         ` Song Bao Hua (Barry Song)
2021-04-20 22:31           ` Song Bao Hua (Barry Song)
2021-03-31 10:07     ` Song Bao Hua (Barry Song)
2021-03-31 10:07       ` Song Bao Hua (Barry Song)

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=110234d1-22ce-8a9a-eabb-c15ac29a5dcd@linux.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --cc=aubrey.li@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=bsegall@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guodong.xu@linaro.org \
    --cc=hpa@zytor.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=juri.lelli@redhat.com \
    --cc=lenb@kernel.org \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=msys.mizuma@gmail.com \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=song.bao.hua@hisilicon.com \
    --cc=sudeep.holla@arm.com \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=xuwei5@huawei.com \
    --cc=yangyicong@huawei.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.