Inter-revision diff: patch 2

Comparing v6 (message) to v5 (message)

--- v6
+++ v5
@@ -6,11 +6,7 @@
 pair of SMT4 cores.
 
 This patch achieves this by setting the SMT level mask to correspond
-to the smallcore sibling mask on big-core systems. This patch also
-ensures that while checked for shared-caches on big-core system, we
-use the smallcore_sibling_mask to compare with the l2_cache_mask.
-This ensure that the CACHE level sched-domain is created, whose groups
-correspond to the threads of the big-core.
+to the smallcore sibling mask on big-core systems.
 
 With this patch, the SMT sched-domain with SMT=8,4,2 on big-core
 systems are as follows:
@@ -41,9 +37,9 @@
 
 Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
 ---
- arch/powerpc/include/asm/smp.h |  6 ++++
- arch/powerpc/kernel/smp.c      | 62 ++++++++++++++++++++++++++++++++++++++----
- 2 files changed, 63 insertions(+), 5 deletions(-)
+ arch/powerpc/include/asm/smp.h |  6 +++++
+ arch/powerpc/kernel/smp.c      | 55 +++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 57 insertions(+), 4 deletions(-)
 
 diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
 index 29ffaab..30798c7 100644
@@ -70,7 +66,7 @@
  {
  	return per_cpu(cpu_core_map, cpu);
 diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
-index 4794d6b..a515780 100644
+index 4794d6b..ea3b306 100644
 --- a/arch/powerpc/kernel/smp.c
 +++ b/arch/powerpc/kernel/smp.c
 @@ -76,10 +76,12 @@
@@ -162,44 +158,19 @@
  
  	/*
  	 * Copy the thread sibling mask into the cache sibling mask
-@@ -1040,6 +1075,7 @@ static void add_cpu_to_masks(int cpu)
- void start_secondary(void *unused)
- {
- 	unsigned int cpu = smp_processor_id();
-+	struct cpumask *(*sibling_mask)(int) = cpu_sibling_mask;
- 
- 	mmgrab(&init_mm);
- 	current->active_mm = &init_mm;
-@@ -1065,11 +1101,13 @@ void start_secondary(void *unused)
- 	/* Update topology CPU masks */
- 	add_cpu_to_masks(cpu);
- 
-+	if (has_big_cores)
-+		sibling_mask = cpu_smallcore_sibling_mask;
- 	/*
- 	 * Check for any shared caches. Note that this must be done on a
- 	 * per-core basis because one core in the pair might be disabled.
- 	 */
--	if (!cpumask_equal(cpu_l2_cache_mask(cpu), cpu_sibling_mask(cpu)))
-+	if (!cpumask_equal(cpu_l2_cache_mask(cpu), sibling_mask(cpu)))
- 		shared_caches = true;
- 
- 	set_numa_node(numa_cpu_lookup_table[cpu]);
-@@ -1136,6 +1174,13 @@ static const struct cpumask *shared_cache_mask(int cpu)
+@@ -1136,6 +1171,11 @@ static const struct cpumask *shared_cache_mask(int cpu)
  	return cpu_l2_cache_mask(cpu);
  }
  
-+#ifdef CONFIG_SCHED_SMT
 +static const struct cpumask *smallcore_smt_mask(int cpu)
 +{
 +	return cpu_smallcore_sibling_mask(cpu);
 +}
-+#endif
 +
  static struct sched_domain_topology_level power9_topology[] = {
  #ifdef CONFIG_SCHED_SMT
  	{ cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) },
-@@ -1158,6 +1203,13 @@ void __init smp_cpus_done(unsigned int max_cpus)
+@@ -1158,6 +1198,13 @@ void __init smp_cpus_done(unsigned int max_cpus)
  
  	dump_numa_cpu_topology();
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help