diff --git a/backport-log-correctly-for-isolated-and-nohz_full-cpus.patch b/backport-log-correctly-for-isolated-and-nohz_full-cpus.patch new file mode 100644 index 0000000..4dc95b9 --- /dev/null +++ b/backport-log-correctly-for-isolated-and-nohz_full-cpus.patch @@ -0,0 +1,57 @@ +From 6fe032945b69d8f382fa3e8de8e4fdce84063199 Mon Sep 17 00:00:00 2001 +From: Yunfeng Ye +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 + diff --git a/irqbalance.spec b/irqbalance.spec index ed63a8b..6a59971 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,7 +1,7 @@ Summary: A dynamic adaptive IRQ balancing daemon Name: irqbalance Version: 1.7.0 -Release: 5 +Release: 6 Epoch: 3 License: GPLv2 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 Patch6001: backport-activate_mapping-activate-only-online-CPUs.patch +Patch6002: backport-log-correctly-for-isolated-and-nohz_full-cpus.patch %description 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 || : %changelog +* Thu Jan 5 2023 qinyu - 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 - 3:1.7.0-5 - Type:bugfix - ID:NA