All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-12 14:10 ` Peter Zijlstra
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-12 14:10 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: mpe, npiggin, christophe.leroy, hca, gor, agordeev, borntraeger,
	svens, tglx, mingo, bp, dave.hansen, x86, hpa, peterz,
	juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, vschneid, linuxppc-dev, linux-kernel,
	linux-s390

Hi

Thomas just tripped over the x86 topology setup creating a 'DIE' domain
for the package mask :-)

Since these names are SCHED_DEBUG only, rename them.
I don't think anybody *should* be relying on this, but who knows.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/powerpc/kernel/smp.c   | 2 +-
 arch/s390/kernel/topology.c | 2 +-
 arch/x86/kernel/smpboot.c   | 2 +-
 kernel/sched/topology.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index fbbb695bae3d..5ed6b9fe5094 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1050,7 +1050,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
 #endif
 	{ shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },
 	{ cpu_mc_mask, SD_INIT_NAME(MC) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..c803f5e6ab46 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -522,7 +522,7 @@ static struct sched_domain_topology_level s390_topology[] = {
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 	{ cpu_book_mask, SD_INIT_NAME(BOOK) },
 	{ cpu_drawer_mask, SD_INIT_NAME(DRAWER) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd7734b..09cc9d0aa358 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -653,7 +653,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, SD_INIT_NAME(PKG)
 		};
 	}
 
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d3a3b2646ec4..e9d9cf776b7a 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1670,7 +1670,7 @@ static struct sched_domain_topology_level default_topology[] = {
 #ifdef CONFIG_SCHED_MC
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 #endif
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 


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

* [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-12 14:10 ` Peter Zijlstra
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-12 14:10 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: juri.lelli, peterz, dave.hansen, bsegall, hpa, agordeev,
	linux-s390, vschneid, vincent.guittot, x86, mingo, mgorman,
	borntraeger, gor, hca, npiggin, bp, rostedt, tglx,
	dietmar.eggemann, linuxppc-dev, linux-kernel, svens, bristot

Hi

Thomas just tripped over the x86 topology setup creating a 'DIE' domain
for the package mask :-)

Since these names are SCHED_DEBUG only, rename them.
I don't think anybody *should* be relying on this, but who knows.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/powerpc/kernel/smp.c   | 2 +-
 arch/s390/kernel/topology.c | 2 +-
 arch/x86/kernel/smpboot.c   | 2 +-
 kernel/sched/topology.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index fbbb695bae3d..5ed6b9fe5094 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1050,7 +1050,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
 #endif
 	{ shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },
 	{ cpu_mc_mask, SD_INIT_NAME(MC) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1de8888..c803f5e6ab46 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -522,7 +522,7 @@ static struct sched_domain_topology_level s390_topology[] = {
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 	{ cpu_book_mask, SD_INIT_NAME(BOOK) },
 	{ cpu_drawer_mask, SD_INIT_NAME(DRAWER) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd7734b..09cc9d0aa358 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -653,7 +653,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, SD_INIT_NAME(PKG)
 		};
 	}
 
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d3a3b2646ec4..e9d9cf776b7a 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1670,7 +1670,7 @@ static struct sched_domain_topology_level default_topology[] = {
 #ifdef CONFIG_SCHED_MC
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 #endif
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 


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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 14:10 ` Peter Zijlstra
@ 2023-07-12 15:02   ` Valentin Schneider
  -1 siblings, 0 replies; 19+ messages in thread
From: Valentin Schneider @ 2023-07-12 15:02 UTC (permalink / raw)
  To: Peter Zijlstra, Thomas Gleixner
  Cc: mpe, npiggin, christophe.leroy, hca, gor, agordeev, borntraeger,
	svens, tglx, mingo, bp, dave.hansen, x86, hpa, peterz,
	juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, linuxppc-dev, linux-kernel, linux-s390

On 12/07/23 16:10, Peter Zijlstra wrote:
> Hi
>
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
>
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
>

FWIW I don't care much about the actual name.

There are some stray references to DIE in comments - see below. Bit funny
to see:
- *  - Package (DIE)
+ *  - Package (PKG)

With that:
Acked-by: Valentin Schneider <vschneid@redhat.com>

---
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a80a73909dc2a..190a647534984 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9439,7 +9439,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
  * can only do it if @group is an SMT group and has exactly on busy CPU. Larger
  * imbalances in the number of CPUS are dealt with in find_busiest_group().
  *
- * If we are balancing load within an SMT core, or at DIE domain level, always
+ * If we are balancing load within an SMT core, or at PKG domain level, always
  * proceed.
  *
  * Return: true if @env::dst_cpu can do with asym_packing load balance. False
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index e9d9cf776b7ab..2cdcfec1d1c89 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1118,7 +1118,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
  *
  *  - Simultaneous multithreading (SMT)
  *  - Multi-Core Cache (MC)
- *  - Package (DIE)
+ *  - Package (PKG)
  *
  * Where the last one more or less denotes everything up to a NUMA node.
  *
@@ -1140,13 +1140,13 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
  *
  * CPU   0   1   2   3   4   5   6   7
  *
- * DIE  [                             ]
+ * PKG  [                             ]
  * MC   [             ] [             ]
  * SMT  [     ] [     ] [     ] [     ]
  *
  *  - or -
  *
- * DIE  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
+ * PKG  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
  * MC	0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
  * SMT  0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
  *


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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-12 15:02   ` Valentin Schneider
  0 siblings, 0 replies; 19+ messages in thread
From: Valentin Schneider @ 2023-07-12 15:02 UTC (permalink / raw)
  To: Peter Zijlstra, Thomas Gleixner
  Cc: juri.lelli, peterz, dave.hansen, bsegall, hpa, agordeev,
	linux-s390, vincent.guittot, x86, mingo, mgorman, borntraeger,
	gor, hca, npiggin, bp, rostedt, tglx, dietmar.eggemann,
	linuxppc-dev, linux-kernel, svens, bristot

On 12/07/23 16:10, Peter Zijlstra wrote:
> Hi
>
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
>
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
>

FWIW I don't care much about the actual name.

There are some stray references to DIE in comments - see below. Bit funny
to see:
- *  - Package (DIE)
+ *  - Package (PKG)

With that:
Acked-by: Valentin Schneider <vschneid@redhat.com>

---
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a80a73909dc2a..190a647534984 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9439,7 +9439,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
  * can only do it if @group is an SMT group and has exactly on busy CPU. Larger
  * imbalances in the number of CPUS are dealt with in find_busiest_group().
  *
- * If we are balancing load within an SMT core, or at DIE domain level, always
+ * If we are balancing load within an SMT core, or at PKG domain level, always
  * proceed.
  *
  * Return: true if @env::dst_cpu can do with asym_packing load balance. False
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index e9d9cf776b7ab..2cdcfec1d1c89 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1118,7 +1118,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
  *
  *  - Simultaneous multithreading (SMT)
  *  - Multi-Core Cache (MC)
- *  - Package (DIE)
+ *  - Package (PKG)
  *
  * Where the last one more or less denotes everything up to a NUMA node.
  *
@@ -1140,13 +1140,13 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
  *
  * CPU   0   1   2   3   4   5   6   7
  *
- * DIE  [                             ]
+ * PKG  [                             ]
  * MC   [             ] [             ]
  * SMT  [     ] [     ] [     ] [     ]
  *
  *  - or -
  *
- * DIE  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
+ * PKG  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
  * MC	0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
  * SMT  0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
  *


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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 15:02   ` Valentin Schneider
@ 2023-07-12 15:08     ` Peter Zijlstra
  -1 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-12 15:08 UTC (permalink / raw)
  To: Valentin Schneider
  Cc: Thomas Gleixner, mpe, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, mingo, bp, dave.hansen, x86, hpa,
	juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, linuxppc-dev, linux-kernel, linux-s390

On Wed, Jul 12, 2023 at 04:02:38PM +0100, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> >
> > Since these names are SCHED_DEBUG only, rename them.
> > I don't think anybody *should* be relying on this, but who knows.
> >
> 
> FWIW I don't care much about the actual name.

Confusion is due to x86 growing an actual die topology and this not
being it.

Other than that, I can't be bothered too much about the silly name
either.

> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>

Durr, I did a git-grep SD_INIT_NAME().. Thanks!

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-12 15:08     ` Peter Zijlstra
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-12 15:08 UTC (permalink / raw)
  To: Valentin Schneider
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vincent.guittot, x86, mingo, mgorman, borntraeger, gor, hca,
	npiggin, bp, rostedt, Thomas Gleixner, dietmar.eggemann, bristot,
	linux-kernel, svens, linuxppc-dev

On Wed, Jul 12, 2023 at 04:02:38PM +0100, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> >
> > Since these names are SCHED_DEBUG only, rename them.
> > I don't think anybody *should* be relying on this, but who knows.
> >
> 
> FWIW I don't care much about the actual name.

Confusion is due to x86 growing an actual die topology and this not
being it.

Other than that, I can't be bothered too much about the silly name
either.

> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>

Durr, I did a git-grep SD_INIT_NAME().. Thanks!

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 15:02   ` Valentin Schneider
@ 2023-07-14  9:28     ` Mel Gorman
  -1 siblings, 0 replies; 19+ messages in thread
From: Mel Gorman @ 2023-07-14  9:28 UTC (permalink / raw)
  To: Valentin Schneider
  Cc: Peter Zijlstra, Thomas Gleixner, mpe, npiggin, christophe.leroy,
	hca, gor, agordeev, borntraeger, svens, mingo, bp, dave.hansen,
	x86, hpa, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
	bsegall, bristot, linuxppc-dev, linux-kernel, linux-s390

On Wed, Jul 12, 2023 at 04:02:38PM +0100, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> >
> > Since these names are SCHED_DEBUG only, rename them.
> > I don't think anybody *should* be relying on this, but who knows.
> >
> 
> FWIW I don't care much about the actual name.
> 
> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>
> 

No objection either, PKG is less ambiguous than DIE

Acked-by: Mel Gorman <mgorman@suse.de>

-- 
Mel Gorman
SUSE Labs

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-14  9:28     ` Mel Gorman
  0 siblings, 0 replies; 19+ messages in thread
From: Mel Gorman @ 2023-07-14  9:28 UTC (permalink / raw)
  To: Valentin Schneider
  Cc: juri.lelli, Peter Zijlstra, dave.hansen, bsegall, hpa, agordeev,
	linux-s390, vincent.guittot, x86, mingo, borntraeger, gor, hca,
	npiggin, bp, rostedt, Thomas Gleixner, dietmar.eggemann, bristot,
	linux-kernel, svens, linuxppc-dev

On Wed, Jul 12, 2023 at 04:02:38PM +0100, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> >
> > Since these names are SCHED_DEBUG only, rename them.
> > I don't think anybody *should* be relying on this, but who knows.
> >
> 
> FWIW I don't care much about the actual name.
> 
> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>
> 

No objection either, PKG is less ambiguous than DIE

Acked-by: Mel Gorman <mgorman@suse.de>

-- 
Mel Gorman
SUSE Labs

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 14:10 ` Peter Zijlstra
@ 2023-07-14 14:04   ` Heiko Carstens
  -1 siblings, 0 replies; 19+ messages in thread
From: Heiko Carstens @ 2023-07-14 14:04 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Thomas Gleixner, mpe, npiggin, christophe.leroy, gor, agordeev,
	borntraeger, svens, mingo, bp, dave.hansen, x86, hpa, juri.lelli,
	vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
	bristot, vschneid, linuxppc-dev, linux-kernel, linux-s390

On Wed, Jul 12, 2023 at 04:10:56PM +0200, Peter Zijlstra wrote:
> Hi
> 
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
> 
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  arch/powerpc/kernel/smp.c   | 2 +-
>  arch/s390/kernel/topology.c | 2 +-
>  arch/x86/kernel/smpboot.c   | 2 +-
>  kernel/sched/topology.c     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

For s390:
Acked-by: Heiko Carstens <hca@linux.ibm.com>

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-14 14:04   ` Heiko Carstens
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Carstens @ 2023-07-14 14:04 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vschneid, vincent.guittot, x86, mingo, mgorman, borntraeger, gor,
	npiggin, bp, rostedt, Thomas Gleixner, dietmar.eggemann, bristot,
	linux-kernel, svens, linuxppc-dev

On Wed, Jul 12, 2023 at 04:10:56PM +0200, Peter Zijlstra wrote:
> Hi
> 
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
> 
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  arch/powerpc/kernel/smp.c   | 2 +-
>  arch/s390/kernel/topology.c | 2 +-
>  arch/x86/kernel/smpboot.c   | 2 +-
>  kernel/sched/topology.c     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

For s390:
Acked-by: Heiko Carstens <hca@linux.ibm.com>

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 15:02   ` Valentin Schneider
@ 2023-07-14 14:25     ` Shrikanth Hegde
  -1 siblings, 0 replies; 19+ messages in thread
From: Shrikanth Hegde @ 2023-07-14 14:25 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	Valentin Schneider, vincent.guittot, x86, mingo, mgorman,
	borntraeger, gor, hca, npiggin, bp, rostedt, Thomas Gleixner,
	dietmar.eggemann, linuxppc-dev, linux-kernel, svens, bristot



On 7/12/23 8:32 PM, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
>> Hi
>>
>> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
>> for the package mask :-)
>>
>> Since these names are SCHED_DEBUG only, rename them.
>> I don't think anybody *should* be relying on this, but who knows.
>>
> 
> FWIW I don't care much about the actual name.
> 
> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>
> 
> ---
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index a80a73909dc2a..190a647534984 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9439,7 +9439,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
>   * can only do it if @group is an SMT group and has exactly on busy CPU. Larger
>   * imbalances in the number of CPUS are dealt with in find_busiest_group().
>   *
> - * If we are balancing load within an SMT core, or at DIE domain level, always
> + * If we are balancing load within an SMT core, or at PKG domain level, always
>   * proceed.
>   *
>   * Return: true if @env::dst_cpu can do with asym_packing load balance. False
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index e9d9cf776b7ab..2cdcfec1d1c89 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1118,7 +1118,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
>   *
>   *  - Simultaneous multithreading (SMT)
>   *  - Multi-Core Cache (MC)
> - *  - Package (DIE)
> + *  - Package (PKG)
>   *
>   * Where the last one more or less denotes everything up to a NUMA node.
>   *
> @@ -1140,13 +1140,13 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
>   *
>   * CPU   0   1   2   3   4   5   6   7
>   *
> - * DIE  [                             ]
> + * PKG  [                             ]
>   * MC   [             ] [             ]
>   * SMT  [     ] [     ] [     ] [     ]
>   *
>   *  - or -
>   *
> - * DIE  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
> + * PKG  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
>   * MC	0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
>   * SMT  0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
>   *
> 

A couple of comments missing the change still? Not sure if it taken care already.

---
 arch/powerpc/kernel/smp.c | 2 +-
 arch/x86/kernel/smpboot.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index fbbb695bae3d..9b1853bf6b1d 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1588,7 +1588,7 @@ static void add_cpu_to_masks(int cpu)
 	/* Skip all CPUs already part of current CPU core mask */
 	cpumask_andnot(mask, cpu_online_mask, cpu_core_mask(cpu));
 
-	/* If chip_id is -1; limit the cpu_core_mask to within DIE*/
+	/* If chip_id is -1; limit the cpu_core_mask to within PKG*/
 	if (chip_id == -1)
 		cpumask_and(mask, mask, cpu_cpu_mask(cpu));
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd7734b..3f175e70eb7a 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -647,7 +647,7 @@ static void __init build_sched_topology(void)
 	};
 #endif
 	/*
-	 * When there is NUMA topology inside the package skip the DIE domain
+	 * When there is NUMA topology inside the package skip the PKG domain
 	 * since the NUMA domains will auto-magically create the right spanning
 	 * domains based on the SLIT.
 	 */

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-14 14:25     ` Shrikanth Hegde
  0 siblings, 0 replies; 19+ messages in thread
From: Shrikanth Hegde @ 2023-07-14 14:25 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vincent.guittot, x86, mingo, mgorman, borntraeger, gor, hca,
	npiggin, bp, rostedt, dietmar.eggemann, linuxppc-dev,
	linux-kernel, svens, bristot, Thomas Gleixner,
	Valentin Schneider



On 7/12/23 8:32 PM, Valentin Schneider wrote:
> On 12/07/23 16:10, Peter Zijlstra wrote:
>> Hi
>>
>> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
>> for the package mask :-)
>>
>> Since these names are SCHED_DEBUG only, rename them.
>> I don't think anybody *should* be relying on this, but who knows.
>>
> 
> FWIW I don't care much about the actual name.
> 
> There are some stray references to DIE in comments - see below. Bit funny
> to see:
> - *  - Package (DIE)
> + *  - Package (PKG)
> 
> With that:
> Acked-by: Valentin Schneider <vschneid@redhat.com>
> 
> ---
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index a80a73909dc2a..190a647534984 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9439,7 +9439,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
>   * can only do it if @group is an SMT group and has exactly on busy CPU. Larger
>   * imbalances in the number of CPUS are dealt with in find_busiest_group().
>   *
> - * If we are balancing load within an SMT core, or at DIE domain level, always
> + * If we are balancing load within an SMT core, or at PKG domain level, always
>   * proceed.
>   *
>   * Return: true if @env::dst_cpu can do with asym_packing load balance. False
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index e9d9cf776b7ab..2cdcfec1d1c89 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1118,7 +1118,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
>   *
>   *  - Simultaneous multithreading (SMT)
>   *  - Multi-Core Cache (MC)
> - *  - Package (DIE)
> + *  - Package (PKG)
>   *
>   * Where the last one more or less denotes everything up to a NUMA node.
>   *
> @@ -1140,13 +1140,13 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
>   *
>   * CPU   0   1   2   3   4   5   6   7
>   *
> - * DIE  [                             ]
> + * PKG  [                             ]
>   * MC   [             ] [             ]
>   * SMT  [     ] [     ] [     ] [     ]
>   *
>   *  - or -
>   *
> - * DIE  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
> + * PKG  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
>   * MC	0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
>   * SMT  0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
>   *
> 

A couple of comments missing the change still? Not sure if it taken care already.

---
 arch/powerpc/kernel/smp.c | 2 +-
 arch/x86/kernel/smpboot.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index fbbb695bae3d..9b1853bf6b1d 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1588,7 +1588,7 @@ static void add_cpu_to_masks(int cpu)
 	/* Skip all CPUs already part of current CPU core mask */
 	cpumask_andnot(mask, cpu_online_mask, cpu_core_mask(cpu));
 
-	/* If chip_id is -1; limit the cpu_core_mask to within DIE*/
+	/* If chip_id is -1; limit the cpu_core_mask to within PKG*/
 	if (chip_id == -1)
 		cpumask_and(mask, mask, cpu_cpu_mask(cpu));
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd7734b..3f175e70eb7a 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -647,7 +647,7 @@ static void __init build_sched_topology(void)
 	};
 #endif
 	/*
-	 * When there is NUMA topology inside the package skip the DIE domain
+	 * When there is NUMA topology inside the package skip the PKG domain
 	 * since the NUMA domains will auto-magically create the right spanning
 	 * domains based on the SLIT.
 	 */

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 14:10 ` Peter Zijlstra
@ 2023-07-17  5:42   ` Gautham R. Shenoy
  -1 siblings, 0 replies; 19+ messages in thread
From: Gautham R. Shenoy @ 2023-07-17  5:42 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Thomas Gleixner, mpe, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, mingo, bp, dave.hansen, x86, hpa,
	juri.lelli, vincent.guittot, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, vschneid, linuxppc-dev, linux-kernel,
	linux-s390

On Wed, Jul 12, 2023 at 04:10:56PM +0200, Peter Zijlstra wrote:
> Hi
> 
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
> 
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

This naming makes sense.
Acked-by: Gautham R. Shenoy <gautham.shenoy@amd.com>

--
Thanks and Regards
gautham.

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-17  5:42   ` Gautham R. Shenoy
  0 siblings, 0 replies; 19+ messages in thread
From: Gautham R. Shenoy @ 2023-07-17  5:42 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vschneid, vincent.guittot, x86, mingo, mgorman, borntraeger, gor,
	hca, npiggin, bp, rostedt, Thomas Gleixner, dietmar.eggemann,
	linuxppc-dev, linux-kernel, svens, bristot

On Wed, Jul 12, 2023 at 04:10:56PM +0200, Peter Zijlstra wrote:
> Hi
> 
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)
> 
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

This naming makes sense.
Acked-by: Gautham R. Shenoy <gautham.shenoy@amd.com>

--
Thanks and Regards
gautham.

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-12 14:10 ` Peter Zijlstra
@ 2023-07-17 13:51   ` Vincent Guittot
  -1 siblings, 0 replies; 19+ messages in thread
From: Vincent Guittot @ 2023-07-17 13:51 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Thomas Gleixner, mpe, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, mingo, bp, dave.hansen, x86, hpa,
	juri.lelli, dietmar.eggemann, rostedt, bsegall, mgorman, bristot,
	vschneid, linuxppc-dev, linux-kernel, linux-s390

On Wed, 12 Jul 2023 at 16:11, Peter Zijlstra <peterz@infradead.org> wrote:
>
> Hi
>
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)

May be a link to the change that triggers this patch could be useful

>
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.

Apart the remaining reference to DIE already mentioned by others,
looks good to me

>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  arch/powerpc/kernel/smp.c   | 2 +-
>  arch/s390/kernel/topology.c | 2 +-
>  arch/x86/kernel/smpboot.c   | 2 +-
>  kernel/sched/topology.c     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index fbbb695bae3d..5ed6b9fe5094 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -1050,7 +1050,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
>  #endif
>         { shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },
>         { cpu_mc_mask, SD_INIT_NAME(MC) },
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
> diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
> index 68adf1de8888..c803f5e6ab46 100644
> --- a/arch/s390/kernel/topology.c
> +++ b/arch/s390/kernel/topology.c
> @@ -522,7 +522,7 @@ static struct sched_domain_topology_level s390_topology[] = {
>         { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
>         { cpu_book_mask, SD_INIT_NAME(BOOK) },
>         { cpu_drawer_mask, SD_INIT_NAME(DRAWER) },
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index e1aa2cd7734b..09cc9d0aa358 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -653,7 +653,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, SD_INIT_NAME(PKG)
>                 };
>         }
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index d3a3b2646ec4..e9d9cf776b7a 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1670,7 +1670,7 @@ static struct sched_domain_topology_level default_topology[] = {
>  #ifdef CONFIG_SCHED_MC
>         { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
>  #endif
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
>

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-17 13:51   ` Vincent Guittot
  0 siblings, 0 replies; 19+ messages in thread
From: Vincent Guittot @ 2023-07-17 13:51 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vschneid, x86, mingo, mgorman, borntraeger, gor, hca, npiggin,
	bp, rostedt, Thomas Gleixner, dietmar.eggemann, bristot,
	linux-kernel, svens, linuxppc-dev

On Wed, 12 Jul 2023 at 16:11, Peter Zijlstra <peterz@infradead.org> wrote:
>
> Hi
>
> Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> for the package mask :-)

May be a link to the change that triggers this patch could be useful

>
> Since these names are SCHED_DEBUG only, rename them.
> I don't think anybody *should* be relying on this, but who knows.

Apart the remaining reference to DIE already mentioned by others,
looks good to me

>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  arch/powerpc/kernel/smp.c   | 2 +-
>  arch/s390/kernel/topology.c | 2 +-
>  arch/x86/kernel/smpboot.c   | 2 +-
>  kernel/sched/topology.c     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index fbbb695bae3d..5ed6b9fe5094 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -1050,7 +1050,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
>  #endif
>         { shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },
>         { cpu_mc_mask, SD_INIT_NAME(MC) },
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
> diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
> index 68adf1de8888..c803f5e6ab46 100644
> --- a/arch/s390/kernel/topology.c
> +++ b/arch/s390/kernel/topology.c
> @@ -522,7 +522,7 @@ static struct sched_domain_topology_level s390_topology[] = {
>         { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
>         { cpu_book_mask, SD_INIT_NAME(BOOK) },
>         { cpu_drawer_mask, SD_INIT_NAME(DRAWER) },
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index e1aa2cd7734b..09cc9d0aa358 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -653,7 +653,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, SD_INIT_NAME(PKG)
>                 };
>         }
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index d3a3b2646ec4..e9d9cf776b7a 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1670,7 +1670,7 @@ static struct sched_domain_topology_level default_topology[] = {
>  #ifdef CONFIG_SCHED_MC
>         { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
>  #endif
> -       { cpu_cpu_mask, SD_INIT_NAME(DIE) },
> +       { cpu_cpu_mask, SD_INIT_NAME(PKG) },
>         { NULL, },
>  };
>
>

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

* Re: [RFC][PATCH] sched: Rename DIE domain
  2023-07-17 13:51   ` Vincent Guittot
@ 2023-07-17 14:19     ` Peter Zijlstra
  -1 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-17 14:19 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: Thomas Gleixner, mpe, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, mingo, bp, dave.hansen, x86, hpa,
	juri.lelli, dietmar.eggemann, rostedt, bsegall, mgorman, bristot,
	vschneid, linuxppc-dev, linux-kernel, linux-s390

On Mon, Jul 17, 2023 at 03:51:25PM +0200, Vincent Guittot wrote:
> On Wed, 12 Jul 2023 at 16:11, Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> 
> May be a link to the change that triggers this patch could be useful

Thomas should post soonish..

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

* Re: [RFC][PATCH] sched: Rename DIE domain
@ 2023-07-17 14:19     ` Peter Zijlstra
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2023-07-17 14:19 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: juri.lelli, dave.hansen, bsegall, hpa, agordeev, linux-s390,
	vschneid, x86, mingo, mgorman, borntraeger, gor, hca, npiggin,
	bp, rostedt, Thomas Gleixner, dietmar.eggemann, bristot,
	linux-kernel, svens, linuxppc-dev

On Mon, Jul 17, 2023 at 03:51:25PM +0200, Vincent Guittot wrote:
> On Wed, 12 Jul 2023 at 16:11, Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > Hi
> >
> > Thomas just tripped over the x86 topology setup creating a 'DIE' domain
> > for the package mask :-)
> 
> May be a link to the change that triggers this patch could be useful

Thomas should post soonish..

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

* [tip: sched/core] sched/topology: Rename 'DIE' domain to 'PKG'
  2023-07-12 14:10 ` Peter Zijlstra
                   ` (4 preceding siblings ...)
  (?)
@ 2023-10-12 17:50 ` tip-bot2 for Peter Zijlstra
  -1 siblings, 0 replies; 19+ messages in thread
From: tip-bot2 for Peter Zijlstra @ 2023-10-12 17:50 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Thomas Gleixner, Peter Zijlstra (Intel),
	Ingo Molnar, Valentin Schneider, Mel Gorman, Heiko Carstens,
	Gautham R. Shenoy, Vincent Guittot, x86, linux-kernel

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     f577cd57bfaa889cf0718e30e92c08c7f78c9d85
Gitweb:        https://git.kernel.org/tip/f577cd57bfaa889cf0718e30e92c08c7f78c9d85
Author:        Peter Zijlstra <peterz@infradead.org>
AuthorDate:    Wed, 12 Jul 2023 16:10:56 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 12 Oct 2023 09:38:16 +02:00

sched/topology: Rename 'DIE' domain to 'PKG'

While reworking the x86 topology code Thomas tripped over creating a 'DIE' domain
for the package mask. :-)

Since these names are CONFIG_SCHED_DEBUG=y only, rename them to make the
name less ambiguous.

[ Shrikanth Hegde: rename on s390 as well. ]
[ Valentin Schneider: also rename it in the comments. ]
[ mingo: port to recent kernels & find all remaining occurances. ]

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Valentin Schneider <vschneid@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20230712141056.GI3100107@hirez.programming.kicks-ass.net
---
 arch/powerpc/kernel/smp.c   | 4 ++--
 arch/s390/kernel/topology.c | 2 +-
 arch/x86/kernel/smpboot.c   | 4 ++--
 kernel/sched/fair.c         | 2 +-
 kernel/sched/topology.c     | 8 ++++----
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 5826f51..4e48700 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1051,7 +1051,7 @@ static struct sched_domain_topology_level powerpc_topology[] = {
 #endif
 	{ shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },
 	{ cpu_mc_mask, SD_INIT_NAME(MC) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
@@ -1595,7 +1595,7 @@ static void add_cpu_to_masks(int cpu)
 	/* Skip all CPUs already part of current CPU core mask */
 	cpumask_andnot(mask, cpu_online_mask, cpu_core_mask(cpu));
 
-	/* If chip_id is -1; limit the cpu_core_mask to within DIE*/
+	/* If chip_id is -1; limit the cpu_core_mask to within PKG */
 	if (chip_id == -1)
 		cpumask_and(mask, mask, cpu_cpu_mask(cpu));
 
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 68adf1d..66bda6a 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -522,7 +522,7 @@ static struct sched_domain_topology_level s390_topology[] = {
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 	{ cpu_book_mask, SD_INIT_NAME(BOOK) },
 	{ cpu_drawer_mask, SD_INIT_NAME(DRAWER) },
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 02765d9..e3b3e80 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -641,13 +641,13 @@ static void __init build_sched_topology(void)
 	};
 #endif
 	/*
-	 * When there is NUMA topology inside the package skip the DIE domain
+	 * When there is NUMA topology inside the package skip the PKG domain
 	 * since the NUMA domains will auto-magically create the right spanning
 	 * domains based on the SLIT.
 	 */
 	if (!x86_has_numa_in_package) {
 		x86_topology[i++] = (struct sched_domain_topology_level){
-			cpu_cpu_mask, x86_die_flags, SD_INIT_NAME(DIE)
+			cpu_cpu_mask, x86_die_flags, SD_INIT_NAME(PKG)
 		};
 	}
 
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 9229051..a751e55 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9555,7 +9555,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
  * can only do it if @group is an SMT group and has exactly on busy CPU. Larger
  * imbalances in the number of CPUS are dealt with in find_busiest_group().
  *
- * If we are balancing load within an SMT core, or at DIE domain level, always
+ * If we are balancing load within an SMT core, or at PKG domain level, always
  * proceed.
  *
  * Return: true if @env::dst_cpu can do with asym_packing load balance. False
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d950861..a63729f 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1119,7 +1119,7 @@ fail:
  *
  *  - Simultaneous multithreading (SMT)
  *  - Multi-Core Cache (MC)
- *  - Package (DIE)
+ *  - Package (PKG)
  *
  * Where the last one more or less denotes everything up to a NUMA node.
  *
@@ -1141,13 +1141,13 @@ fail:
  *
  * CPU   0   1   2   3   4   5   6   7
  *
- * DIE  [                             ]
+ * PKG  [                             ]
  * MC   [             ] [             ]
  * SMT  [     ] [     ] [     ] [     ]
  *
  *  - or -
  *
- * DIE  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
+ * PKG  0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7
  * MC	0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
  * SMT  0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
  *
@@ -1681,7 +1681,7 @@ static struct sched_domain_topology_level default_topology[] = {
 #ifdef CONFIG_SCHED_MC
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
 #endif
-	{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
+	{ cpu_cpu_mask, SD_INIT_NAME(PKG) },
 	{ NULL, },
 };
 

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

end of thread, other threads:[~2023-10-12 17:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12 14:10 [RFC][PATCH] sched: Rename DIE domain Peter Zijlstra
2023-07-12 14:10 ` Peter Zijlstra
2023-07-12 15:02 ` Valentin Schneider
2023-07-12 15:02   ` Valentin Schneider
2023-07-12 15:08   ` Peter Zijlstra
2023-07-12 15:08     ` Peter Zijlstra
2023-07-14  9:28   ` Mel Gorman
2023-07-14  9:28     ` Mel Gorman
2023-07-14 14:25   ` Shrikanth Hegde
2023-07-14 14:25     ` Shrikanth Hegde
2023-07-14 14:04 ` Heiko Carstens
2023-07-14 14:04   ` Heiko Carstens
2023-07-17  5:42 ` Gautham R. Shenoy
2023-07-17  5:42   ` Gautham R. Shenoy
2023-07-17 13:51 ` Vincent Guittot
2023-07-17 13:51   ` Vincent Guittot
2023-07-17 14:19   ` Peter Zijlstra
2023-07-17 14:19     ` Peter Zijlstra
2023-10-12 17:50 ` [tip: sched/core] sched/topology: Rename 'DIE' domain to 'PKG' tip-bot2 for Peter Zijlstra

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.