From d8feb456a3b59ab95f7ed31bbdfc1dec95fefdd2 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Fri, 1 Jul 2022 10:58:18 +0800 Subject: [PATCH] Release 1.9.0-1 Rebase to latest upstream release v1.9.0 Resolves:rhbz2098635 Signed-off-by: Tao Liu --- ...alance-to-systems-where-it-is-useful.patch | 26 --- ...unication-socket-when-UI-is-disabled.patch | 159 ------------------ irqbalance-1.8.0-Document-migrateval.patch | 34 ---- ...yBoundingSet-from-irqbalance-service.patch | 32 ---- ...p-NoNewPrivs-from-irqbalance-service.patch | 31 ---- irqbalance.spec | 19 +-- sources | 2 +- 7 files changed, 7 insertions(+), 296 deletions(-) delete mode 100644 irqbalance-1.8.0-Confine-irqbalance-to-systems-where-it-is-useful.patch delete mode 100644 irqbalance-1.8.0-Disable-the-communication-socket-when-UI-is-disabled.patch delete mode 100644 irqbalance-1.8.0-Document-migrateval.patch delete mode 100644 irqbalance-1.8.0-Drop-CapabilityBoundingSet-from-irqbalance-service.patch delete mode 100644 irqbalance-1.8.0-drop-NoNewPrivs-from-irqbalance-service.patch diff --git a/irqbalance-1.8.0-Confine-irqbalance-to-systems-where-it-is-useful.patch b/irqbalance-1.8.0-Confine-irqbalance-to-systems-where-it-is-useful.patch deleted file mode 100644 index 5e681d2..0000000 --- a/irqbalance-1.8.0-Confine-irqbalance-to-systems-where-it-is-useful.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 188f9efc567bcaef25bde2813cdee7f952f992f9 Mon Sep 17 00:00:00 2001 -From: Pat Riehecky -Date: Mon, 4 Apr 2022 08:38:32 -0500 -Subject: [PATCH] Confine irqbalance to systems where it is useful. - -Systems with only one CPU cannot benefit from this service, so -don't start it when it isn't worth the resource consumption. ---- - misc/irqbalance.service | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/misc/irqbalance.service b/misc/irqbalance.service -index fcc29c2..0f79c3e 100644 ---- a/misc/irqbalance.service -+++ b/misc/irqbalance.service -@@ -3,6 +3,7 @@ Description=irqbalance daemon - Documentation=man:irqbalance(1) - Documentation=https://github.com/Irqbalance/irqbalance - ConditionVirtualization=!container -+ConditionCPUs=>1 - - [Service] - EnvironmentFile=-/usr/lib/irqbalance/defaults.env --- -2.33.1 - diff --git a/irqbalance-1.8.0-Disable-the-communication-socket-when-UI-is-disabled.patch b/irqbalance-1.8.0-Disable-the-communication-socket-when-UI-is-disabled.patch deleted file mode 100644 index 07d2545..0000000 --- a/irqbalance-1.8.0-Disable-the-communication-socket-when-UI-is-disabled.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 4342acd8d7862e862e0b661135b10671ffeac119 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Thu, 22 Jul 2021 03:05:59 +0800 -Subject: [PATCH] Disable the communication socket when UI is disabled - -The communication socket is added to support the UI, when UI is not -built, also disable the socket. - -Signed-off-by: Kairui Song ---- - configure.ac | 11 +++++++---- - cputree.c | 4 ++++ - irqbalance.c | 23 ++++++++++++++++------- - 3 files changed, 27 insertions(+), 11 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 92a5113..c45b9ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -41,10 +41,13 @@ AC_C_INLINE - AM_PROG_CC_C_O - - AC_ARG_WITH([irqbalance-ui], -- [AC_HELP_STRING([--without-irqbalance-ui], -- [Dont build the irqbalance ui component])], -- [with_irqbalanceui=$withval], [with_irqbalanceui=yes]) -- -+ [AS_HELP_STRING([--without-irqbalance-ui], -+ [Dont build the irqbalance ui component])], -+ [with_irqbalanceui=$withval], [with_irqbalanceui=yes]) -+AS_IF( -+ [test "x$with_irqbalanceui" = "xyes"], [ -+ AC_DEFINE([HAVE_IRQBALANCEUI], 1, [Build irqbalance ui component.]) -+]) - AM_CONDITIONAL([IRQBALANCEUI], [test x$with_irqbalanceui = xyes]) - - AC_ARG_WITH([systemd], -diff --git a/cputree.c b/cputree.c -index e4695f2..b716a8f 100644 ---- a/cputree.c -+++ b/cputree.c -@@ -39,7 +39,9 @@ - - #include "irqbalance.h" - -+#ifdef HAVE_IRQBALANCEUI - extern char *banned_cpumask_from_ui; -+#endif - extern char *cpu_ban_string; - - GList *cpus; -@@ -113,12 +115,14 @@ static void setup_banned_cpus(void) - cpumask_t isolated_cpus; - char *env = NULL; - -+#ifdef HAVE_IRQBALANCEUI - /* A manually specified cpumask overrides auto-detection. */ - if (cpu_ban_string != NULL && banned_cpumask_from_ui != NULL) { - cpulist_parse(banned_cpumask_from_ui, - strlen(banned_cpumask_from_ui), banned_cpus); - goto out; - } -+#endif - - /* - * Notes: -diff --git a/irqbalance.c b/irqbalance.c -index 3f94847..07a245f 100644 ---- a/irqbalance.c -+++ b/irqbalance.c -@@ -31,22 +31,21 @@ - #include - #include - #include --#include --#include - #include - #include - #ifdef HAVE_GETOPT_LONG - #include - #endif -- - #ifdef HAVE_LIBCAP_NG - #include - #endif -+#ifdef HAVE_IRQBALANCEUI -+#include -+#include -+#endif - #include "irqbalance.h" - - volatile int keep_going = 1; --int socket_fd; --char socket_name[64]; - int one_shot_mode; - int debug_mode; - int foreground_mode; -@@ -67,9 +66,14 @@ int last_interval; - GMainLoop *main_loop; - - char *cpu_ban_string = NULL; --char *banned_cpumask_from_ui = NULL; - unsigned long migrate_ratio = 0; - -+#ifdef HAVE_IRQBALANCEUI -+int socket_fd; -+char socket_name[64]; -+char *banned_cpumask_from_ui = NULL; -+#endif -+ - static void sleep_approx(int seconds) - { - struct timespec ts; -@@ -405,6 +409,7 @@ void get_object_stat(struct topo_obj *object, void *data) - } - } - -+#ifdef HAVE_IRQBALANCEUI - gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attribute__((unused))) - { - char buff[500]; -@@ -585,6 +590,7 @@ int init_socket() - g_unix_fd_add(socket_fd, G_IO_IN, sock_handle, NULL); - return 0; - } -+#endif - - int main(int argc, char** argv) - { -@@ -688,10 +694,12 @@ int main(int argc, char** argv) - parse_proc_interrupts(); - parse_proc_stat(); - -+#ifdef HAVE_IRQBALANCEUI - if (init_socket()) { - ret = EXIT_FAILURE; - goto out; - } -+#endif - main_loop = g_main_loop_new(NULL, FALSE); - last_interval = sleep_interval; - g_timeout_add_seconds(sleep_interval, scan, NULL); -@@ -707,11 +715,12 @@ out: - /* Remove pidfile */ - if (!foreground_mode && pidfile) - unlink(pidfile); -+#ifdef HAVE_IRQBALANCEUI - /* Remove socket */ - if (socket_fd > 0) - close(socket_fd); - if (socket_name[0]) - unlink(socket_name); -- -+#endif - return ret; - } --- -2.31.1 - diff --git a/irqbalance-1.8.0-Document-migrateval.patch b/irqbalance-1.8.0-Document-migrateval.patch deleted file mode 100644 index 6d24507..0000000 --- a/irqbalance-1.8.0-Document-migrateval.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 917b10268cf5c2a4a6b624b4bb9928e5e3fe2353 Mon Sep 17 00:00:00 2001 -From: Neil Horman -Date: Thu, 7 Apr 2022 08:25:42 -0400 -Subject: [PATCH] Document migrateval - ---- - irqbalance.1 | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/irqbalance.1 b/irqbalance.1 -index 215f75a..361faea 100644 ---- a/irqbalance.1 -+++ b/irqbalance.1 -@@ -134,6 +134,17 @@ script processing should continue - This indicates that an error has occurred in the script, and it should be skipped - (further processing to continue) - -+.TP -+.B --migrateval, -e -+Specify a minimum migration ratio to trigger a rebalancing -+Normally any improvement in load distribution will trigger the migration of an -+irq, as long as preforming the migration will not simply move the load to a new -+cpu. By specifying a migration value, the load balance improvement is subject -+to hysteresis defined by this value, which is inversely propotional to the -+value. For example, a value of 2 in this option tells irqbalance that the -+improvement in load distribution must be at least 50%, a value of 4 indicates -+the load distribution improvement must be at least 25%, etc -+ - .TP - .B -s, --pid= - Have irqbalance write its process id to the specified file. By default no --- -2.33.1 - diff --git a/irqbalance-1.8.0-Drop-CapabilityBoundingSet-from-irqbalance-service.patch b/irqbalance-1.8.0-Drop-CapabilityBoundingSet-from-irqbalance-service.patch deleted file mode 100644 index c855f8a..0000000 --- a/irqbalance-1.8.0-Drop-CapabilityBoundingSet-from-irqbalance-service.patch +++ /dev/null @@ -1,32 +0,0 @@ -From efab2725ea5165732c5e98c0e083a4eec6e355e3 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Fri, 24 Sep 2021 17:43:30 +0800 -Subject: [PATCH] Drop CapabilityBoundingSet from irqbalance service - -libcapng is issuing an error in the system log when irqbalance attempts -to drop capabilities, but systemd service unit has already done dropped -all capabilities. commit 43751df tried to fix this but it didn't fix it -completely. CapabilityBoundingSet also need to be dropped. - -Fixes #182 - -Signed-off-by: Kairui Song ---- - misc/irqbalance.service | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/misc/irqbalance.service b/misc/irqbalance.service -index 014798c..fcc29c2 100644 ---- a/misc/irqbalance.service -+++ b/misc/irqbalance.service -@@ -8,7 +8,6 @@ ConditionVirtualization=!container - EnvironmentFile=-/usr/lib/irqbalance/defaults.env - EnvironmentFile=-/path/to/irqbalance.env - ExecStart=/usr/sbin/irqbalance --foreground $IRQBALANCE_ARGS --CapabilityBoundingSet= - ReadOnlyPaths=/ - ReadWritePaths=/proc/irq - RestrictAddressFamilies=AF_UNIX --- -2.31.1 - diff --git a/irqbalance-1.8.0-drop-NoNewPrivs-from-irqbalance-service.patch b/irqbalance-1.8.0-drop-NoNewPrivs-from-irqbalance-service.patch deleted file mode 100644 index 63cc6f4..0000000 --- a/irqbalance-1.8.0-drop-NoNewPrivs-from-irqbalance-service.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 43751dfc7f29fbf2c46ffcd4fdb6d3f6db291927 Mon Sep 17 00:00:00 2001 -From: Neil Horman -Date: Wed, 12 May 2021 09:26:10 -0400 -Subject: [PATCH] drop NoNewPrivs from irqbalance service - -A recent update to libcapng is issuing an error in the system log, -caused by the fact that irqbalance attempts to drop capabilities when -the systemd service unit has already done so for us. Since irqbalance -drops the caps correctly, theres really no need for us to do so via -systemd as well. So lets drop NoNewCaps in the service unit. - -Signed-off-by: Neil Horman ---- - misc/irqbalance.service | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/misc/irqbalance.service b/misc/irqbalance.service -index e7a3336..014798c 100644 ---- a/misc/irqbalance.service -+++ b/misc/irqbalance.service -@@ -9,7 +9,6 @@ EnvironmentFile=-/usr/lib/irqbalance/defaults.env - EnvironmentFile=-/path/to/irqbalance.env - ExecStart=/usr/sbin/irqbalance --foreground $IRQBALANCE_ARGS - CapabilityBoundingSet= --NoNewPrivileges=yes - ReadOnlyPaths=/ - ReadWritePaths=/proc/irq - RestrictAddressFamilies=AF_UNIX --- -2.31.1 - diff --git a/irqbalance.spec b/irqbalance.spec index 7872158..e7a0e1c 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,6 +1,6 @@ Name: irqbalance -Version: 1.8.0 -Release: 5%{?dist} +Version: 1.9.0 +Release: 1%{?dist} Epoch: 2 Summary: IRQ balancing daemon @@ -23,12 +23,7 @@ Requires: numactl-libs ExcludeArch: s390 s390x -Patch1: irqbalance-1.8.0-drop-NoNewPrivs-from-irqbalance-service.patch -Patch2: irqbalance-1.8.0-Disable-the-communication-socket-when-UI-is-disabled.patch -Patch3: irqbalance-1.8.0-Drop-CapabilityBoundingSet-from-irqbalance-service.patch -Patch4: irqbalance-1.8.0-Confine-irqbalance-to-systems-where-it-is-useful.patch -Patch5: irqbalance-1.8.0-Document-migrateval.patch -Patch6: irqbalance-1.8.0-env-file-path.patch +Patch1: irqbalance-1.8.0-env-file-path.patch %description irqbalance is a daemon that evenly distributes IRQ load across @@ -37,11 +32,6 @@ multiple CPUs for enhanced performance. %prep %setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %build ./autogen.sh @@ -82,6 +72,9 @@ fi /sbin/chkconfig --del irqbalance >/dev/null 2>&1 || : %changelog +* Mon Jun 20 2022 Tao Liu - 2:1.9.0-1 +- Rebase to latest upstream release v1.9.0. Resolves:rhbz2097871 + * Fri Apr 8 2022 Tao Liu - 2:1.8.0-5 - Document migrateval. Resolves: rhbz2071959 - Confine irqbalance to systems where it is useful. Resolves: rhbz2063930 diff --git a/sources b/sources index 9a2801e..c56e2e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (irqbalance-1.8.0.tar.gz) = 3d757198dbe680b010ed9233d73cbf3b4a150e6b07ef97d3e94f5fa0472a22b0b3800868634340fb413a18683ff95ff6a8f7fa51ace65d870651336479e32740 +SHA512 (irqbalance-1.9.0.tar.gz) = 878977da5eff18e53bdceeaa4aca952f73ba8b03eb028cf176816af971ffc65f0b1f1bb3a68e3a2502491895cc2b9438652dc97d5696232bb2f64860109e9a24