]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: fix numa distance for form0 device tree
authorVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Fri, 22 Mar 2013 05:49:35 +0000 (05:49 +0000)
committerMichael Ellerman <michael@ellerman.id.au>
Thu, 18 Apr 2013 05:59:56 +0000 (15:59 +1000)
commitcdf195b4496d532add78349be49cd5ea809d2cdf
tree06c6565017262551c12b1c672d772a29c40fca3f
parentfafc218e798328c49940f93142795670b366dbb6
powerpc: fix numa distance for form0 device tree

The following commit breaks numa distance setup for old powerpc
systems that use form0 encoding in device tree.

commit 9ab27453671cee0b62e6550777b4c30539a91879
powerpc/numa: Use form 1 affinity to setup node distance

Device tree node /rtas/ibm,associativity-reference-points would
index into /cpus/PowerPCxxxx/ibm,associativity based on form0 or
form1 encoding detected by ibm,architecture-vec-5 property.

All modern systems use form1 and current kernel code is correct.
However, on older systems with form0 encoding, the numa distance
will get hard coded as LOCAL_DISTANCE for all nodes.  This causes
task scheduling anomaly since scheduler will skip building numa
level domain (topmost domain with all cpus) if all numa distances
are same.  (value of 'level' in sched_init_numa() will remain 0)

Prior to the above commit:
((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)

Restoring compatible behavior with this patch for old powerpc systems
with device tree where numa distance are encoded as form0.

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
arch/powerpc/mm/numa.c