powerpc: VPHN topology change updates all siblings
PATCH v3 1/1 powerpc: VPHN topology change updates all siblings
When an associativity level change is found for one thread, the siblings threads need to be updated as well. This is done today for PRRN in stage_topology_update() but is missing for VPHN in update_cpu_associativity_changes_mask(). This patch will correctly update all thread siblings during a topology change.
Without this patch a topology update can result in a CPU in init_sched_groups_power() getting stuck indefinitely in a loop.
This loop is built in build_sched_groups(). As a result of the thread moving to a node separate from its siblings the struct sched_group will have its next pointer set to point to itself rather than the sched_group struct of the next thread. This happens because we have a domain without the SD_OVERLAP flag, which is correct, and a topology that doesn't conform with reality (threads on the same core assigned to different numa nodes). When this list is traversed by init_sched_groups_power() it will reach the thread's sched_group structure and loop indefinitely; the cpu will be stuck at this point.
The bug was exposed when VPHN was enabled in commit b7abef0 (v3.9).
---
v2. cpu_sibling_mask is now defined for UP which fixes that build break. v3. Corrected with Cc:stable under singed-off-by and improved description
of impact of this issue.
- While re-enabled only in v3.9, hardware VPHN support was available prior to this. This could be a pervasive issue and should be considered for the stable tree.
---
arch/powerpc/include/asm/smp.h | 4 +++ arch/powerpc/mm/numa.c |
59 +++++++++++++++++++++++++++++++----------- 2 files changed, 48 insertions(+), 15 deletions(-)
arch/powerpc/include/asm/smp.h +4 -0
@@ -145,6 +145,10 @@ extern void __cpu_die(unsigned int cpu);#define smp_setup_cpu_maps ()static inline void inhibit_secondary_onlining (void ) {}static inline void uninhibit_secondary_onlining (void ) {} +static inline const struct cpumask *cpu_sibling_mask (int cpu) +{ +return cpumask_of (cpu); +}#endif /* CONFIG_SMP */
arch/powerpc/mm/numa.c +44 -15
95 lines not on this page · raw message
Signature · 1 line
1.8.1.2