[RFC][PATCH] sched: Rename DIE domain

Shrikanth Hegde sshegde at linux.vnet.ibm.com
Sat Jul 15 00:25:10 AEST 2023



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 at 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.
 	 */


More information about the Linuxppc-dev mailing list