irqbalance: Also fetch node info for non-PCI devices
Also fetch node info for non-PCI devices Signed-off-by: qinyu <qinyu32@huawei.com>
This commit is contained in:
parent
08ae98ad73
commit
e8c09cb04f
39
backport-Also-fetch-node-info-for-non-PCI-devices.patch
Normal file
39
backport-Also-fetch-node-info-for-non-PCI-devices.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 31dea01f3a47aa6374560638486879e5129f9c94 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
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/<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
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: A dynamic adaptive IRQ balancing daemon
|
||||
Name: irqbalance
|
||||
Version: 1.7.0
|
||||
Release: 8
|
||||
Release: 9
|
||||
Epoch: 3
|
||||
License: GPLv2
|
||||
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
|
||||
@ -27,6 +27,7 @@ Patch6002: backport-log-correctly-for-isolated-and-nohz_full-cpus.patch
|
||||
Patch6003: backport-add-irq-hotplug-feature-for-irqbalance.patch
|
||||
Patch6004: backport-Add-log-for-hotplug-appropriately.patch
|
||||
Patch6005: backport-Add-hot-pull-method-for-irqbalance.patch
|
||||
Patch6006: backport-Also-fetch-node-info-for-non-PCI-devices.patch
|
||||
|
||||
%description
|
||||
Irqbalance is a daemon to help balance the cpu load generated by
|
||||
@ -84,6 +85,12 @@ fi
|
||||
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-9
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC: Also fetch node info for non-PCI devices
|
||||
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-8
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user