Support IRQBALANCE_BANNED_CPULIST env variable
The env variable IRQBALANCE_BANNED_CPUS will be discarded, so backport to support IRQBALANCE_BANNED_CPULIST instead. Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
This commit is contained in:
parent
edf694bd80
commit
4745d1cb0a
39
Add-IRQBALANCE_BANNED_CPULIST-to-env-file.patch
Normal file
39
Add-IRQBALANCE_BANNED_CPULIST-to-env-file.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 31c7d128fd6f083c7395b327f824a0c11d5e380f Mon Sep 17 00:00:00 2001
|
||||
From: Yunfeng Ye <yeyunfeng@huawei.com>
|
||||
Date: Sat, 21 Nov 2020 14:27:28 +0800
|
||||
Subject: [PATCH] Add IRQBALANCE_BANNED_CPULIST to env file
|
||||
|
||||
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
|
||||
---
|
||||
misc/irqbalance.env | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/misc/irqbalance.env b/misc/irqbalance.env
|
||||
index 23570b2..237e4af 100644
|
||||
--- a/misc/irqbalance.env
|
||||
+++ b/misc/irqbalance.env
|
||||
@@ -22,6 +22,21 @@
|
||||
#IRQBALANCE_BANNED_CPUS=
|
||||
|
||||
#
|
||||
+# IRQBALANCE_BANNED_CPULIST
|
||||
+# The CPUs list which allows you to indicate which CPUs should
|
||||
+# be skipped when reblancing IRQs. CPU numbers in CPUs list will
|
||||
+# not have any IRQs assigned to them on rebalance.
|
||||
+#
|
||||
+# The format of CPUs list is:
|
||||
+# <cpu number>,...,<cpu number>
|
||||
+# or a range:
|
||||
+# <cpu number>-<cpu number>
|
||||
+# or a mixture:
|
||||
+# <cpu number>,...,<cpu number>-<cpu number>
|
||||
+#
|
||||
+#IRQBALANCE_BANNED_CPULIST=
|
||||
+
|
||||
+#
|
||||
# IRQBALANCE_ARGS
|
||||
# Append any args here to the irqbalance daemon as documented in the man
|
||||
# page.
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
52
add-env-variable-to-ban-cpus-using-cpulist-syntax.patch
Normal file
52
add-env-variable-to-ban-cpus-using-cpulist-syntax.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 677b686e223c74e64f5b230bdb4079555a5a62a9 Mon Sep 17 00:00:00 2001
|
||||
From: ChanderG <mail@chandergovind.org>
|
||||
Date: Tue, 25 Aug 2020 15:46:56 +0530
|
||||
Subject: [PATCH] add env variable to ban cpus using cpulist syntax
|
||||
|
||||
allows banning of cpus using the taskset cpulist syntax in addition to the
|
||||
bitmap syntax supported via the existing environment variable
|
||||
IRQBALANCE_BANNED_CPUS
|
||||
|
||||
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
|
||||
---
|
||||
cputree.c | 6 ++++++
|
||||
irqbalance.1 | 6 ++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/cputree.c b/cputree.c
|
||||
index 0433657..00cf47f 100644
|
||||
--- a/cputree.c
|
||||
+++ b/cputree.c
|
||||
@@ -127,6 +127,12 @@ static void setup_banned_cpus(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ env = getenv("IRQBALANCE_BANNED_CPULIST");
|
||||
+ if (env && strlen(env)) {
|
||||
+ cpulist_parse(env, strlen(env), banned_cpus);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
path = "/sys/devices/system/cpu/isolated";
|
||||
process_one_line(path, get_mask_from_cpulist, &isolated_cpus);
|
||||
|
||||
diff --git a/irqbalance.1 b/irqbalance.1
|
||||
index 3005f6b..33ffd26 100644
|
||||
--- a/irqbalance.1
|
||||
+++ b/irqbalance.1
|
||||
@@ -158,6 +158,12 @@ Provides a mask of CPUs which irqbalance should ignore and never assign interrup
|
||||
If not specified, irqbalance use mask of isolated and adaptive-ticks CPUs on the
|
||||
system as the default value.
|
||||
|
||||
+.TP
|
||||
+.B IRQBALANCE_BANNED_CPULIST
|
||||
+Provides a cpulist which irqbalance should ignore and never assign interrupts to.
|
||||
+If not specified, irqbalance use mask of isolated and adaptive-ticks CPUs on the
|
||||
+system as the default value.
|
||||
+
|
||||
.SH "SIGNALS"
|
||||
.TP
|
||||
.B SIGHUP
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: A dynamic adaptive IRQ balancing daemon
|
||||
Name: irqbalance
|
||||
Version: 1.7.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Epoch: 3
|
||||
License: GPLv2
|
||||
Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/irqbalance-%{version}.tar.gz
|
||||
@ -21,6 +21,9 @@ Requires: numactl-libs
|
||||
|
||||
%define _hardened_build 1
|
||||
|
||||
Patch6000: add-env-variable-to-ban-cpus-using-cpulist-syntax.patch
|
||||
Patch6001: Add-IRQBALANCE_BANNED_CPULIST-to-env-file.patch
|
||||
|
||||
%description
|
||||
Irqbalance is a daemon to help balance the cpu load generated by
|
||||
interrupts across all of a systems cpus. Irqbalance identifies the
|
||||
@ -77,6 +80,12 @@ fi
|
||||
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Tue Jan 15 2021 Yunfeng Ye<yeyunfeng@huawei.com> - 3:1.7.0-3
|
||||
- Type:enhanced
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC:support IRQBALANCE_BANNED_CPULIST env variable
|
||||
|
||||
* Thu Sep 10 2020 Chunsheng Luo <luochunsheng@huawei.com> - 3:1.7.0-2
|
||||
- Type:enhanced
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user