From 31dea01f3a47aa6374560638486879e5129f9c94 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Thu, 28 Jan 2021 15:24:32 +0800 Subject: [PATCH] Also fetch node info for non-PCI devices non-PCI devices could also be bind to a certain node. So if failed to fetch the info from sysfs, try to get it from /proc/irq//node. Conflict:NA Reference:https://github.com/Irqbalance/irqbalance/commit/31dea01f3a47aa6374560638486879e5129f9c94 --- classify.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/classify.c b/classify.c index beb2919..105ecd6 100644 --- a/classify.c +++ b/classify.c @@ -361,9 +361,14 @@ static struct irq_info *add_one_irq_to_db(const char *devpath, struct irq_info * get_numa_node: numa_node = NUMA_NO_NODE; - if (devpath != NULL && numa_avail) { - sprintf(path, "%s/numa_node", devpath); - process_one_line(path, get_int, &numa_node); + if (numa_avail) { + if (devpath != NULL) { + sprintf(path, "%s/numa_node", devpath); + process_one_line(path, get_int, &numa_node); + } else { + sprintf(path, "/proc/irq/%i/node", irq); + process_one_line(path, get_int, &numa_node); + } } if (pol->numa_node_set == 1) -- 2.23.0