powerpc/numa: Early request for home node associativity
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Wed, 29 Jan 2020 13:53:00 +0000 (19:23 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:44:30 +0000 (22:44 +1100)
commitdc909d8b0c9c0d2c42dc1cf34216c4830f639f7b
tree19726936c817c7a18bd24b3ad9446e586a3df6c5
parent413e40550c5cfdba7e062aa6350a0d2448014519
powerpc/numa: Early request for home node associativity

Currently the kernel detects if its running on a shared lpar platform
and requests home node associativity before the scheduler sched_domains
are setup. However between the time NUMA setup is initialized and the
request for home node associativity, workqueue initializes its per node
cpumask. The per node workqueue possible cpumask may turn invalid
after home node associativity resulting in weird situations like
workqueue possible cpumask being a subset of workqueue online cpumask.

This can be fixed by requesting home node associativity earlier just
before NUMA setup. However at the NUMA setup time, kernel may not be in
a position to detect if its running on a shared lpar platform. So
request for home node associativity and if the request fails, fallback
on the device tree property.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200129135301.24739-5-srikar@linux.vnet.ibm.com
arch/powerpc/mm/numa.c