ibmvnic: Add hotpluggable CPU callbacks to reassign affinity hints
authorNick Child <nnac123@linux.ibm.com>
Thu, 10 Nov 2022 21:32:17 +0000 (15:32 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2022 10:47:07 +0000 (10:47 +0000)
commit92125c3a602454824d70edb1b2abb382811cab4f
tree13dc4ac62d7f73d9e83c7a703e70f5a19b6c3f73
parent44fbc1b6e0e291df1d31f5080777ce66a72ef37a
ibmvnic: Add hotpluggable CPU callbacks to reassign affinity hints

When CPU's are added and removed, ibmvnic devices will reassign
hint values. Introduce a new cpu hotplug state CPUHP_IBMVNIC_DEAD
to signal to ibmvnic devices that the CPU has been removed and it
is time to reset affinity hint assignments. On the other hand,
when CPU's are being added, add a state instance to
CPUHP_AP_ONLINE_DYN which will trigger a reassignment of affinity
hints once the new CPU's are online. This implementation is based
on the virtio_net driver.

Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com>
Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h
include/linux/cpuhotplug.h