]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: VPHN topology change updates all siblings
authorRobert Jennings <rcj@linux.vnet.ibm.com>
Thu, 25 Jul 2013 01:13:21 +0000 (20:13 -0500)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 1 Aug 2013 03:11:47 +0000 (13:11 +1000)
commit3468765ad7c5657306b679d0bbcbdf98236da0b4
tree55f7be0aa23b1d0647aea236abde4a854009d392
parentaf367eb2d0044e15a6ebffadb1812fcf7f246067
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 bafa619 (v3.9).

Cc: <stable@vger.kernel.org> [v3.9+]
Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/smp.h
arch/powerpc/mm/numa.c