From f97c2da792b7df3b31974fd00944d77760ed15cf Mon Sep 17 00:00:00 2001 From: qinyu Date: Thu, 5 Jan 2023 19:41:15 +0800 Subject: [PATCH] irqbalance: add keep_going check to prevent irqbalance from failing to exit after SIGTERM add keep_going check to prevent irqbalance from failing to exit after SIGTERM Signed-off-by: qinyu --- ...e-from-failing-to-exit-after-SIGTERM.patch | 29 +++++++++++++++++++ irqbalance.spec | 9 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch diff --git a/backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch b/backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch new file mode 100644 index 0000000..b9a68ff --- /dev/null +++ b/backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch @@ -0,0 +1,29 @@ +From 028082a6a1ff650d5cdf796ac55ac26a3874372a Mon Sep 17 00:00:00 2001 +From: Liu Chao +Date: Sat, 25 Jun 2022 14:13:10 +0800 +Subject: [PATCH] add keep_going check to prevent irqbalance from failing to + exit after SIGTERM + +Reference: https://github.com/Irqbalance/irqbalance/commit/028082a6a1ff650d5cdf796ac55ac26a3874372a +Conflict: NA + +Signed-off-by: Liu Chao +--- + irqbalance.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/irqbalance.c b/irqbalance.c +index c520c11..5eae5b6 100644 +--- a/irqbalance.c ++++ b/irqbalance.c +@@ -290,7 +290,7 @@ gboolean scan(gpointer data __attribute__((unused))) + + + /* cope with cpu hotplug -- detected during /proc/interrupts parsing */ +- while (need_rescan || need_rebuild) { ++ while (keep_going && (need_rescan || need_rebuild)) { + int try_times = 0; + + need_rescan = 0; +-- +2.23.0 diff --git a/irqbalance.spec b/irqbalance.spec index 7d62bd3..0824b1b 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: 16 +Release: 17 Epoch: 3 License: GPLv2 Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz @@ -35,6 +35,7 @@ Patch6010: backport-Fix-compile-issue-with-none-AARCH64-builds.patch Patch6011: backport-remove-no-existing-irq-in-banned_irqs.patch Patch6012: backport-Add-0-to-the-end-of-strings-to-avoid-heap-buffer-ove.patch Patch6013: backport-Fix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch +Patch6014: backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch %description Irqbalance is a daemon to help balance the cpu load generated by @@ -92,6 +93,12 @@ fi /sbin/chkconfig --del %{name} >/dev/null 2>&1 || : %changelog +* Thu Jan 5 2023 qinyu - 3:1.7.0-17 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC: add keep_going check to prevent irqbalance from failing to exit after SIGTERM + * Thu Jan 5 2023 qinyu - 3:1.7.0-16 - Type:bugfix - ID:NA