[RFC 1/2] genirq: honor device NUMA node when allocating descs
From: Stefan Hajnoczi
Date: Wed Jun 17 2020 - 05:37:47 EST
Use the device's NUMA node instead of the first masked CPUs node when
descs are allocated. The mask may include all CPUs and therefore not
correspond to the home NUMA node of the device.
Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
---
kernel/irq/irqdesc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 1a7723604399..b9c4160d72c4 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -488,7 +488,8 @@ static int alloc_descs(unsigned int start, unsigned int cnt, int node,
IRQD_MANAGED_SHUTDOWN;
}
mask = &affinity->mask;
- node = cpu_to_node(cpumask_first(mask));
+ if (node == NUMA_NO_NODE)
+ node = cpu_to_node(cpumask_first(mask));
affinity++;
}
--
2.26.2