diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2016-10-18 15:50:23 -0500 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-10-28 09:36:58 +1100 |
commit | 4bcfa56ca9f6970974255dd5621b08e5aa9e5af5 (patch) | |
tree | 3e44357402c10315e7ba218c1aef7acc4a37d068 /target-s390x | |
parent | 30ca440eec9fe1d7eec5a48addac656438778278 (diff) | |
download | qemu-4bcfa56ca9f6970974255dd5621b08e5aa9e5af5.zip qemu-4bcfa56ca9f6970974255dd5621b08e5aa9e5af5.tar.gz qemu-4bcfa56ca9f6970974255dd5621b08e5aa9e5af5.tar.bz2 |
spapr_pci: advertise explicit numa IDs even when there's 1 node
With the addition of "numa_node" properties for PHBs we began
advertising NUMA affinity in cases where nb_numa_nodes > 1.
Since the default on the guest side is to make no assumptions about
PHB NUMA affinity (defaulting to -1), there is still a valid use-case
for explicitly defining a PHB's NUMA affinity even when there's just
one node. In particular, some workloads make faulty assumptions about
/sys/bus/pci/<devid>/numa_node being >= 0, warranting the use of
this property as a workaround even if there's just 1 PHB or NUMA
node.
Enable this use-case by always advertising the PHB's NUMA affinity
if "numa_node" has been explicitly set.
We could achieve this by relaxing the check to simply be
nb_numa_nodes > 0, but even safer would be to check
numa_info[nodeid].present explicitly, and to fail at start time
for cases where it does not exist.
This has an additional affect of no longer advertising PHB NUMA
affinity unconditionally if nb_numa_nodes > 1 and "numa_node"
property is unset/-1, but since the default value on the guest
side for each PHB is also -1, the behavior should be the same for
that situation. We could still retain the old behavior if desired,
but the decision seems arbitrary, so we take the simpler route.
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Shivaprasad G. Bhat <shivapbh@in.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-s390x')
0 files changed, 0 insertions, 0 deletions