irqbalance: log correctly for isolated and nohz_full cpus
log correctly for isolated and nohz_full cpus Signed-off-by: qinyu <qinyu32@huawei.com>
This commit is contained in:
parent
b1a4f44928
commit
f17762e55a
57
backport-log-correctly-for-isolated-and-nohz_full-cpus.patch
Normal file
57
backport-log-correctly-for-isolated-and-nohz_full-cpus.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
From 6fe032945b69d8f382fa3e8de8e4fdce84063199 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yunfeng Ye <yeyunfeng@huawei.com>
|
||||||
|
Date: Fri, 20 Nov 2020 00:15:58 +0800
|
||||||
|
Subject: [PATCH] log correctly for isolated and nohz_full cpus
|
||||||
|
|
||||||
|
When the banded CPU is configured, and the "isolcpus" or "nohz_full"
|
||||||
|
is configured, the log for isolated and nohz CPUs are not correct.
|
||||||
|
|
||||||
|
So only log relevant infomation when isolcpus and nohz_full has been
|
||||||
|
handled, also put the cpus_clear() closer.
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/Irqbalance/irqbalance/commit/6fe032945b69d8f382fa3e8de8e4fdce84063199
|
||||||
|
---
|
||||||
|
cputree.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cputree.c b/cputree.c
|
||||||
|
index 80a6d9d..eed20db 100644
|
||||||
|
--- a/cputree.c
|
||||||
|
+++ b/cputree.c
|
||||||
|
@@ -112,9 +112,6 @@ static void setup_banned_cpus(void)
|
||||||
|
cpumask_t isolated_cpus;
|
||||||
|
char *env = NULL;
|
||||||
|
|
||||||
|
- cpus_clear(isolated_cpus);
|
||||||
|
- cpus_clear(nohz_full);
|
||||||
|
-
|
||||||
|
/* A manually specified cpumask overrides auto-detection. */
|
||||||
|
if (cpu_ban_string != NULL && banned_cpumask_from_ui != NULL) {
|
||||||
|
cpulist_parse(banned_cpumask_from_ui,
|
||||||
|
@@ -133,6 +130,9 @@ static void setup_banned_cpus(void)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ cpus_clear(isolated_cpus);
|
||||||
|
+ cpus_clear(nohz_full);
|
||||||
|
+
|
||||||
|
path = "/sys/devices/system/cpu/isolated";
|
||||||
|
process_one_line(path, get_mask_from_cpulist, &isolated_cpus);
|
||||||
|
|
||||||
|
@@ -141,11 +141,11 @@ static void setup_banned_cpus(void)
|
||||||
|
|
||||||
|
cpus_or(banned_cpus, nohz_full, isolated_cpus);
|
||||||
|
|
||||||
|
-out:
|
||||||
|
cpumask_scnprintf(buffer, 4096, isolated_cpus);
|
||||||
|
log(TO_CONSOLE, LOG_INFO, "Isolated CPUs: %s\n", buffer);
|
||||||
|
cpumask_scnprintf(buffer, 4096, nohz_full);
|
||||||
|
log(TO_CONSOLE, LOG_INFO, "Adaptive-ticks CPUs: %s\n", buffer);
|
||||||
|
+out:
|
||||||
|
cpumask_scnprintf(buffer, 4096, banned_cpus);
|
||||||
|
log(TO_CONSOLE, LOG_INFO, "Banned CPUs: %s\n", buffer);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Summary: A dynamic adaptive IRQ balancing daemon
|
Summary: A dynamic adaptive IRQ balancing daemon
|
||||||
Name: irqbalance
|
Name: irqbalance
|
||||||
Version: 1.7.0
|
Version: 1.7.0
|
||||||
Release: 5
|
Release: 6
|
||||||
Epoch: 3
|
Epoch: 3
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
|
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
|
||||||
@ -23,6 +23,7 @@ Requires: numactl-libs
|
|||||||
|
|
||||||
Patch6000: fix-unsigned-integer-subtraction-sign-overflow.patch
|
Patch6000: fix-unsigned-integer-subtraction-sign-overflow.patch
|
||||||
Patch6001: backport-activate_mapping-activate-only-online-CPUs.patch
|
Patch6001: backport-activate_mapping-activate-only-online-CPUs.patch
|
||||||
|
Patch6002: backport-log-correctly-for-isolated-and-nohz_full-cpus.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Irqbalance is a daemon to help balance the cpu load generated by
|
Irqbalance is a daemon to help balance the cpu load generated by
|
||||||
@ -80,6 +81,12 @@ fi
|
|||||||
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-6
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC: log correctly for isolated and nohz_full cpus
|
||||||
|
|
||||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-5
|
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-5
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user