Message ID | 20200617093725.1725569-2-stefanha@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | genirq: take device NUMA node into account for managed IRQs | expand |
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++; }
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@redhat.com> --- kernel/irq/irqdesc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)