From f998943254f13110bfc682ba05298f33be1ee133 Mon Sep 17 00:00:00 2001 From: qinyu Date: Tue, 17 Jan 2023 09:43:15 +0800 Subject: [PATCH] irqbalance: upgrade irqbalance to v1.9.2 upgrade irqbalance to v1.9.2 Signed-off-by: qinyu --- ...vedptr-is-NULL-before-invoking-strle.patch | 31 ---- ...ix-IRQ-name-parsing-on-certain-arm64.patch | 76 ---------- ...e-from-failing-to-exit-after-SIGTERM.patch | 26 ---- ...errupts-fix-parsing-interrupt-counts.patch | 25 ---- ...irq-migrate-rule-to-avoid-high-cpu-i.patch | 25 ++-- ...-add-new-user-irq-policy-config-rule.patch | 139 +++++++++++------- ...re-add-switch-to-clear-affinity-hint.patch | 14 +- ...e-verifyhint-to-detect-hint-variatio.patch | 66 ++++----- irqbalance-1.9.0.tar.gz | Bin 55779 -> 0 bytes irqbalance-1.9.2.tar.gz | Bin 0 -> 62188 bytes irqbalance.spec | 16 +- 11 files changed, 145 insertions(+), 273 deletions(-) delete mode 100644 backport-check-whether-savedptr-is-NULL-before-invoking-strle.patch delete mode 100644 backport-procinterrupts-Fix-IRQ-name-parsing-on-certain-arm64.patch delete mode 100644 bugfix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch delete mode 100644 bugfix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch delete mode 100644 irqbalance-1.9.0.tar.gz create mode 100644 irqbalance-1.9.2.tar.gz diff --git a/backport-check-whether-savedptr-is-NULL-before-invoking-strle.patch b/backport-check-whether-savedptr-is-NULL-before-invoking-strle.patch deleted file mode 100644 index 1057ba1..0000000 --- a/backport-check-whether-savedptr-is-NULL-before-invoking-strle.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 522883505d3b02e3294f045f49007b61c00e2c31 Mon Sep 17 00:00:00 2001 -From: Chao Liu -Date: Wed, 8 Jun 2022 10:04:02 +0800 -Subject: [PATCH] check whether savedptr is NULL before invoking strlen - -Reference: https://github.com/Irqbalance/irqbalance/commit/522883505d3b02e3294f045f49007b61c00e2c31 -Conflict: NA - -savedptr can be null in musl libc, so the strlen(NULL) will segfault - -Signed-off-by: Chao Liu ---- - procinterrupts.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/procinterrupts.c b/procinterrupts.c -index 9015177..57c8801 100644 ---- a/procinterrupts.c -+++ b/procinterrupts.c -@@ -178,7 +178,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) - } - - #ifdef AARCH64 -- if (strlen(savedptr) > 0) { -+ if (savedptr && strlen(savedptr) > 0) { - snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr); - tmp = strchr(irq_fullname, '\n'); - if (tmp) --- -2.33.0 - diff --git a/backport-procinterrupts-Fix-IRQ-name-parsing-on-certain-arm64.patch b/backport-procinterrupts-Fix-IRQ-name-parsing-on-certain-arm64.patch deleted file mode 100644 index 714efa2..0000000 --- a/backport-procinterrupts-Fix-IRQ-name-parsing-on-certain-arm64.patch +++ /dev/null @@ -1,76 +0,0 @@ -From bbcd9a42c3cec0935b960b7f2046f1fdfab4f7ef Mon Sep 17 00:00:00 2001 -From: Vignesh Raghavendra -Date: Wed, 7 Dec 2022 19:46:19 +0530 -Subject: [PATCH] procinterrupts: Fix IRQ name parsing on certain arm64 SoC - -Reference: https://github.com/Irqbalance/irqbalance/commit/bbcd9a42c3cec0935b960b7f2046f1fdfab4f7ef -Conflict: NA - -On arm64 SoCs like TI's K3 SoC and few other SoCs, IRQ names don't get -parsed correct due to which they end up being classified into wrong -class. Fix this by considering last token to contain IRQ name always. - -Eg.: /proc/interrupt - -cat /proc/interrupts - CPU0 CPU1 CPU2 CPU3 - 11: 7155 8882 7235 7791 GICv3 30 Level arch_timer - 14: 0 0 0 0 GICv3 23 Level arm-pmu - 15: 0 0 0 0 GICv3 208 Level 4b00000.spi - 16: 0 0 0 0 GICv3 209 Level 4b10000.spi -116: 0 0 0 0 MSI-INTA 1716234 Level 485c0100.dma-controller chan6 -134: 166 0 0 0 MSI-INTA 1970707 Level 8000000.ethernet-tx0 -224: 149 0 0 0 MSI-INTA 1971731 Level 8000000.ethernet - -W/o patch irqbalance -d -IRQ (11) guessed as class 0 -IRQ (14) guessed as class 0 -IRQ (15) guessed as class 0 -IRQ (16) guessed as class 0 -IRQ 485c0100.dma-controller chan6(116) guessed as class 0 -IRQ (134) guessed as class 0 -IRQ (224) guessed as class 0 - -W/ this patch -IRQ arch_timer(11) guessed as class 0 -IRQ arm-pmu(14) guessed as class 0 -IRQ 4b00000.spi(15) guessed as class 0 -IRQ 4b10000.spi(16) guessed as class 0 -IRQ 485c0100.dma-controller chan6(116) guessed as class 0 -IRQ 8000000.ethernet-tx0(134) guessed as class 5 -IRQ 8000000.ethernet(224) guessed as class 5 -IRQ 8000000.ethernet(257) guessed as class 5 -IRQ -davinci_gpio wl18xx(362) guessed as class - -Signed-off-by: Vignesh Raghavendra ---- - procinterrupts.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/procinterrupts.c b/procinterrupts.c -index e91b203..ec7a52b 100644 ---- a/procinterrupts.c -+++ b/procinterrupts.c -@@ -178,12 +178,14 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) - } - - #ifdef AARCH64 -- if (savedptr && strlen(savedptr) > 0) { -+ if (savedptr && strlen(savedptr) > 0) - snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr); -- tmp = strchr(irq_fullname, '\n'); -- if (tmp) -- *tmp = 0; -- } -+ else -+ snprintf(irq_fullname, PATH_MAX, "%s", last_token); -+ -+ tmp = strchr(irq_fullname, '\n'); -+ if (tmp) -+ *tmp = 0; - #else - snprintf(irq_fullname, PATH_MAX, "%s", last_token); - #endif --- -2.33.0 - diff --git a/bugfix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch b/bugfix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch deleted file mode 100644 index b53cca0..0000000 --- a/bugfix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 - -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 \ No newline at end of file diff --git a/bugfix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch b/bugfix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch deleted file mode 100644 index 2fb971f..0000000 --- a/bugfix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0a82dddbaf5702caded0d0d83a6eafaca743254d Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Mon, 27 Jun 2022 13:43:04 +0200 -Subject: [PATCH] parse_proc_interrupts: fix parsing interrupt counts - -The name of an interrupt chip can start with a number, stop before it. ---- - procinterrupts.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/procinterrupts.c b/procinterrupts.c -index 57c8801..d90bf6d 100644 ---- a/procinterrupts.c -+++ b/procinterrupts.c -@@ -331,7 +331,7 @@ void parse_proc_interrupts(void) - while (1) { - uint64_t C; - C = strtoull(c, &c2, 10); -- if (c==c2) /* end of numbers */ -+ if (c==c2 || !strchr(" \t", *c2)) /* end of numbers */ - break; - count += C; - c=c2; --- -2.23.0 \ No newline at end of file diff --git a/feature-add-new-irq-migrate-rule-to-avoid-high-cpu-i.patch b/feature-add-new-irq-migrate-rule-to-avoid-high-cpu-i.patch index fa75593..79b8ebf 100644 --- a/feature-add-new-irq-migrate-rule-to-avoid-high-cpu-i.patch +++ b/feature-add-new-irq-migrate-rule-to-avoid-high-cpu-i.patch @@ -8,14 +8,14 @@ the min_load after moving irq. However, we can accept that the delta load become --- irqbalance.c | 8 +++++++- irqbalance.h | 1 + - irqlist.c | 6 ++++- - 3 files changed, 10 insertions(+), 2 deletions(-) + irqlist.c | 6 +++++- + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/irqbalance.c b/irqbalance.c -index 9449e40..82ac3ea 100644 +index de7f4e4..ee2c988 100644 --- a/irqbalance.c +++ b/irqbalance.c -@@ -72,6 +72,7 @@ GMainLoop *main_loop; +@@ -71,6 +71,7 @@ GMainLoop *main_loop; char *cpu_ban_string = NULL; unsigned long migrate_ratio = 0; @@ -23,8 +23,7 @@ index 9449e40..82ac3ea 100644 #ifdef HAVE_IRQBALANCEUI int socket_fd; - char socket_name[64]; -@@ -106,6 +107,7 @@ struct option lopts[] = { +@@ -111,6 +112,7 @@ struct option lopts[] = { {"hintpolicy", 1, NULL, 'h'}, {"verifyhint", 1, NULL, 'v'}, {"notclearhint", 0, NULL, 'n'}, @@ -32,7 +31,7 @@ index 9449e40..82ac3ea 100644 {0, 0, 0, 0} }; -@@ -115,6 +117,7 @@ static void usage(void) +@@ -120,6 +122,7 @@ static void usage(void) log(TO_CONSOLE, LOG_INFO, " [--powerthresh= | -p | ] [--banirq= | -i ] [--banmod= | -m ] [--policyscript= | -l