lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 1/2] genirq: honor device NUMA node when allocating descs
Date
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(-)

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
\
 
 \ /
  Last update: 2020-06-17 11:39    [W:0.067 / U:1.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site