summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2025-12-01 22:48:13 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2025-12-01 23:40:02 -0500
commit18c8c609913aac602df58f53763ff915e18c7a03 (patch)
tree08769618b043c24ce9a9dd843a88876c7d3748d4
parent5459ca4fdc2a6342ff4d4edd928bafbd07c14ce5 (diff)
downloadmeta-virtualization-18c8c609913aac602df58f53763ff915e18c7a03.tar.gz
irqbalance: update to v1.9.4
Along with picking up the latest commits: - we drop our previously backported patch - make the init system selection more flexible, with a systemd PACKAGECONFIG - package the upstream .service file + support environment Bumping irqbalance to version v1.9.4-85-g4c23485, which comprises the following commits: 907b65f meson: force systemd-service installation with a seperate option 14fb838 Fixed incorrect comparison in snprintf() in procinterrupts.c. 5fdc1d6 Added missing '/' and fixed message in procinterrupts.c. 030edf9 Safer string handling in procinterrupts.c. 0a7ca36 Increase file descriptor limit via systemd service file ef80188 update workflows to ubuntu-24.04 41cb97c Properly embed EnvironmentFile sourced systemd configs into meson and autonconf 4996883 Unify meson and autoconf: Install executables to sbin ffa304a Fix the wrong string existence checking condition d602002 check_platform_device: Check the length of path 105b155 Check API command length, allow up to 16384 d434114 fix some GCC fanalyzer warnings 3685d33 Use EPERM instead of EIO when try setting irq affinity fails 1489ae3 irqbalance.1: a , b => a, b; it's type => its type 25fa380 Check info->moved before updating 196385b Add CAP_SETPCAP to CapabilityBoundingSet in irqbalance.service 5d9eb19 Version option should return 0 rather than 1 2860da4 Minor punctuation fix. 42115bd define IRQBALANCE_ARGS as empty string to squelch systemd warning da75aae conver strncmp to g_str_has_prefix 6f9f9e9 avoid malloc with create_credentials_msg 4341808 use g_strdup_printf 4d53728 gcc analyzer: increase socket_name size e39848b gcc analyzer: add NULL checks 7622883 remove malloc from ucred a7cfbeb use g_malloc and friends 13916f7 clang-tidy: remove pointless casts 2ed4dd0 clang-tidy: don't assign in if 16564e3 clang-tidy: add missing free d36ae56 direct initialize iovec 5010a97 direct initialize msghdr members 9851c8c Remove extraneous space causing --with-systemd not be aligned c90599b Disable linking to curses if --without-irqbalance-ui is specified. 5405144 Track IRQ "slots" count per CPU to avoid overflowing d16ad5d Wrap migrate_irq in a higher level utility function 44795ad CI: add meson CI e78ea26 clang-tidy: remove duplicate include 02f7c17 clang-tidy: remove redundant declarations 9b1ced2 clang-tidy: remove return in void functions 2c3cbb5 clang-tidy: don't use else after return 8f575ec replace malloc with g_malloc0 4c1b0a0 clang-tidy: properly use strncmp 122ae9e clang-tidy: don't assign in if 80a8aeb ui: change void to char 2e1bf90 meson: use find_library for numa 280b89d meson: replace generic array with files() f2c8309 Drop ProtectKernelTunables 23c6da7 meson: add a minimum version decorator ea733f4 meson: drop redundant install_man() options 21e1ae8 meson: bump project version to 1.9.4 922ee47 meson: move build files to repository root f2aebff cast void pointer to actual type b6a831d add void to fix strict-prototypes 1277ea5 fix 32-bit formats 8301666 Check fflush() return value c0cd614 irqbalance-ui: check if using a negative index of buffer f8b8cdd update configure to version 1.9.4 8d7c783 Flush file before closing de0fe4a Fix socket API being blocked for 10s a99b604 Set additional systemd options for service f4d987f activate_mapping: set errsave before first jump to the error label b4c3771 Avoid repeated affinity checks when no change is necessary ad0ea2c Slience "... rebalancing" messages for unmigratable IRQs f3282f4 filter console only output when using journal mode 43cace4 Enable systemd feature support by default when building with meson 2c167c4 Add support for linking against libnl when building with meson 73cc58c Turn NUMA support into an enabled feature, when building with meson 1aed521 Set project version of meson build to 1.9.3 f042291 Install man pages when building with meson 2b59014 When building with meson, make sure to link against numa 5635a2e Updating to version 1.9.3 75a15c5 Automatically use systemd journal and run in foreground when under systemd bc7794d activate_mapping: avoid logging error when there is none eee7917 activate_mapping: only blacklist irq if error is considered permanent 9a1fd29 activate_mapping: report error reason 470a64b activate_mapping: make sure to catch all errors f589bdc activate_mapping: avoid use-after-free when affinity cannot be set 4efc192 Revert "activate_mapping: fflush the buffered data to smp_affinity" 8bbc0ae activate_mapping: fflush the buffered data to smp_affinity d02ec54 procinterrupts: fix initialisation of regex_t struct 0e05127 Fix it so we actually stop when we hit an interrupt condition 3920e06 Fix signedness of error handling ea1e9a7 Revert "Fix CPU number condition in service file" 0e9acb6 Issue 259: select NL_SKIP / NL_STOP based on error f166b00 fix CPU number condition in service file c91bdf6 thermal: Fix log message for perf and efficiency f85c6c1 ui: do not force black background ac4ba06 irqbalance: fix memory leak in irq hotplug path bbcd9a4 procinterrupts: Fix IRQ name parsing on certain arm64 SoC 178cf3b thermal: Fix the warning message efec4c6 allow AF_NETLINK in the systemd service restrictions 7c18ffc optimize getting cpu number 3ddaa30 updating to version 1.9.2 febe697 change the log level in thermal.c from error to warning b25b1f9 Avoid double free on deinit_thermal() 014765d Fix uninitialized variable e10949e irqbalance: fix a minor typo ac05cb7 updating to version 1.9.1 725d9b1 irqbalance: properly check if irq is banned 402ca1b irqbalance-ui: display irq name in SETUP IRQS d48eaf6 irqbalance: use endptr to check whether the input parameter is empty c8d1fff irqbalance-ui: skip ',' in parse_setup to avoid coredump cfb15f0 Improve documentation and logging for banned cpus 577796a irqbalance-ui: print cpulist in SETUP IRQS db7dc03 irqbalance-ui: support scroll under tui mode of irqbalance-ui a61b382 fix memory leak in ui/ui.c b65faa2 irqbalance-ui: can't change window when in editing state 7f1caca irqbalance-ui: move 'ASSIGNED TO CPUS' to the last column 0a82ddd parse_proc_interrupts: fix parsing interrupt counts 028082a add keep_going check to prevent irqbalance from failing to exit after SIGTERM 5602913 Handle thermal events to mask CPUs c65cda1 Implement Netlink helper functions to subscribe thermal events b66647a Prepare to handle thermal event 378d470 add meson bd67801 Enable static building of irqbalance 5228835 check whether savedptr is NULL before invoking strlen ff48ac9 get irq->module relationship from /sys/bus/pci/*/driver 80d5fbb updating to version 1.0.9 df3436b Add the cpus_copy() helper 61a9423 correct wait time in oneshot mode 917b102 Document migrateval 188f9ef Confine irqbalance to systems where it is useful. 0f594a6 Separate variable declaration from assignment 9b004c6 Ensure that we get all of a unix message Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/irqbalance/irqbalance.inc22
-rw-r--r--recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch298
-rw-r--r--recipes-extended/irqbalance/irqbalance_git.bb5
3 files changed, 16 insertions, 309 deletions
diff --git a/recipes-extended/irqbalance/irqbalance.inc b/recipes-extended/irqbalance/irqbalance.inc
index 038cbae3..a145a3b3 100644
--- a/recipes-extended/irqbalance/irqbalance.inc
+++ b/recipes-extended/irqbalance/irqbalance.inc
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
14 " 14 "
15 15
16DEPENDS = "glib-2.0" 16DEPENDS = "glib-2.0"
17DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
17 18
18INITSCRIPT_NAME = "irqbalanced" 19INITSCRIPT_NAME = "irqbalanced"
19INITSCRIPT_PARAMS = "defaults" 20INITSCRIPT_PARAMS = "defaults"
@@ -21,26 +22,31 @@ INITSCRIPT_PARAMS = "defaults"
21inherit autotools update-rc.d pkgconfig systemd 22inherit autotools update-rc.d pkgconfig systemd
22 23
23SYSTEMD_PACKAGES = "irqbalance" 24SYSTEMD_PACKAGES = "irqbalance"
24SYSTEMD_SERVICE:irqbalance = "irqbalanced.service" 25SYSTEMD_SERVICE:irqbalance = "irqbalance.service"
25 26
26EXTRA_OECONF = "--program-transform-name= \ 27EXTRA_OECONF = "--program-transform-name= \
27 " 28 "
28 29
29# let the recipes or appends define options 30# let the recipes or appends define options
30# 31#
31PACKAGECONFIG ?= "" 32PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
32
33# enable,disable,depends,rdepends 33# enable,disable,depends,rdepends
34# 34#
35PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl," 35PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl,"
36PACKAGECONFIG[libcap-ng] = "--with-libcap-ng,--without-libcap-ng,libcap-ng," 36PACKAGECONFIG[libcap-ng] = "--with-libcap-ng,--without-libcap-ng,libcap-ng,"
37PACKAGECONFIG[systemd] = "--with-systemd,,,"
37 38
38do_install () { 39do_install () {
39 oe_runmake 'DESTDIR=${D}' install 40 oe_runmake 'DESTDIR=${D}' install
40 install -d ${D}${sysconfdir}/init.d
41 cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced
42 chmod 755 ${D}${sysconfdir}/init.d/irqbalanced
43 41
44 install -d ${D}${systemd_unitdir}/system 42 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
45 install -m 0644 ${S}/misc/irqbalance.service ${D}${systemd_unitdir}/system/irqbalanced.service 43 install -d ${D}${systemd_unitdir}/system
44 else
45 install -d ${D}${sysconfdir}/init.d
46 cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced
47 chmod 755 ${D}${sysconfdir}/init.d/irqbalanced
48 fi
46} 49}
50
51# in case systemd support files are installed
52FILES:${PN} += "${prefix}${sysconfdir}/default/" \ No newline at end of file
diff --git a/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch b/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch
deleted file mode 100644
index f40d6897..00000000
--- a/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch
+++ /dev/null
@@ -1,298 +0,0 @@
1From c25dfc295df789ceb1ed890ab7e5a9694503d829 Mon Sep 17 00:00:00 2001
2From: Rosen Penev <rosenp@gmail.com>
3Date: Sun, 31 Mar 2024 14:31:22 -0700
4Subject: [PATCH] add void to fix strict-prototypes
5
6This becomes a hard error with C23
7
8Signed-off-by: Rosen Penev <rosenp@gmail.com>
9Upstream-Status: Backport [https://github.com/Irqbalance/irqbalance/commit/b6a831d692ed7e12db7748db49b3b39516d151d2]
10---
11 irqbalance.c | 2 +-
12 irqbalance.h | 2 +-
13 procinterrupts.c | 2 +-
14 ui/helpers.c | 2 +-
15 ui/helpers.h | 2 +-
16 ui/irqbalance-ui.c | 4 ++--
17 ui/irqbalance-ui.h | 5 ++---
18 ui/ui.c | 24 ++++++++++++------------
19 ui/ui.h | 26 +++++++++++++-------------
20 9 files changed, 34 insertions(+), 35 deletions(-)
21
22diff --git a/irqbalance.c b/irqbalance.c
23index e8d9ba9..d7b4184 100644
24--- a/irqbalance.c
25+++ b/irqbalance.c
26@@ -554,7 +554,7 @@ out:
27 return TRUE;
28 }
29
30-int init_socket()
31+int init_socket(void)
32 {
33 struct sockaddr_un addr;
34 memset(&addr, 0, sizeof(struct sockaddr_un));
35diff --git a/irqbalance.h b/irqbalance.h
36index e7f6b94..96ee07a 100644
37--- a/irqbalance.h
38+++ b/irqbalance.h
39@@ -36,7 +36,7 @@ extern char *classes[];
40 extern void parse_cpu_tree(void);
41 extern void clear_work_stats(void);
42 extern void parse_proc_interrupts(void);
43-extern GList* collect_full_irq_list();
44+extern GList* collect_full_irq_list(void);
45 extern void parse_proc_stat(void);
46 extern void set_interrupt_count(int number, uint64_t count);
47 extern void set_msi_interrupt_numa(int number);
48diff --git a/procinterrupts.c b/procinterrupts.c
49index 9015177..938cfad 100644
50--- a/procinterrupts.c
51+++ b/procinterrupts.c
52@@ -204,7 +204,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq)
53 info->name = strdup(irq_fullname);
54 }
55
56-GList* collect_full_irq_list()
57+GList* collect_full_irq_list(void)
58 {
59 GList *tmp_list = NULL;
60 FILE *file;
61diff --git a/ui/helpers.c b/ui/helpers.c
62index 5d71275..14861cb 100644
63--- a/ui/helpers.c
64+++ b/ui/helpers.c
65@@ -163,7 +163,7 @@ void dump_node(cpu_node_t *node, void *data __attribute__((unused)))
66 }
67 }
68
69-void dump_tree()
70+void dump_tree(void)
71 {
72 for_each_node(tree, dump_node, NULL);
73 }
74diff --git a/ui/helpers.h b/ui/helpers.h
75index b8d9fcc..922914b 100644
76--- a/ui/helpers.h
77+++ b/ui/helpers.h
78@@ -25,7 +25,7 @@ void for_each_node(GList *list, void (*fp)(cpu_node_t *node, void *data), void *
79
80 void dump_irq(irq_t *irq, void *data __attribute__((unused)));
81 void dump_node(cpu_node_t *node, void *data __attribute__((unused)));
82-void dump_tree();
83+void dump_tree(void);
84
85
86 #endif /* HELPERS_H */
87diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c
88index 3ad3553..132bb45 100644
89--- a/ui/irqbalance-ui.c
90+++ b/ui/irqbalance-ui.c
91@@ -23,7 +23,7 @@ GMainLoop *main_loop;
92 int is_tree = 1;
93 static int default_bufsz = 8192;
94
95-struct msghdr * create_credentials_msg()
96+struct msghdr * create_credentials_msg(void)
97 {
98 struct ucred *credentials = malloc(sizeof(struct ucred));
99 credentials->pid = getpid();
100@@ -46,7 +46,7 @@ struct msghdr * create_credentials_msg()
101 return msg;
102 }
103
104-int init_connection()
105+int init_connection(void)
106 {
107 struct sockaddr_un addr;
108 memset(&addr, 0, sizeof(struct sockaddr_un));
109diff --git a/ui/irqbalance-ui.h b/ui/irqbalance-ui.h
110index fba7e7c..e9f6114 100644
111--- a/ui/irqbalance-ui.h
112+++ b/ui/irqbalance-ui.h
113@@ -70,8 +70,8 @@ typedef struct setup {
114
115 /* Function prototypes */
116
117-struct msghdr * create_credentials_msg();
118-int init_connection();
119+struct msghdr * create_credentials_msg(void);
120+int init_connection(void);
121 void send_settings(char *data);
122 char * get_data(char *string);
123 void parse_setup(char *setup_data);
124@@ -81,7 +81,6 @@ void assign_cpu_lists(cpu_node_t *node, void *data);
125 void assign_cpu_mask(cpu_node_t *node, void *data);
126 void parse_into_tree(char *data);
127 gboolean rescan_tree(gpointer data);
128-int main();
129
130
131 #endif /* IRQBALANCE_UI_H */
132diff --git a/ui/ui.c b/ui/ui.c
133index 6ff3305..bc1d743 100644
134--- a/ui/ui.c
135+++ b/ui/ui.c
136@@ -17,7 +17,7 @@ char *IRQ_CLASS_TO_STR[] = {
137 "10-Gigabit Ethernet",
138 "Virt Event"};
139
140-void show_frame()
141+void show_frame(void)
142 {
143 int i;
144 attrset(COLOR_PAIR(4));
145@@ -33,7 +33,7 @@ void show_frame()
146 }
147 }
148
149-void show_footer()
150+void show_footer(void)
151 {
152 char footer[COLS];
153 snprintf(footer, COLS - 1,
154@@ -149,7 +149,7 @@ void print_cpu_line(cpu_ban_t *cpu, void *data)
155 (*line_offset)++;
156 }
157
158-void print_all_cpus()
159+void print_all_cpus(void)
160 {
161 if(all_cpus == NULL) {
162 for_each_node(tree, get_cpu, NULL);
163@@ -168,7 +168,7 @@ void add_banned_cpu(int *banned_cpu, void *data)
164 snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu);
165 }
166
167-void display_banned_cpus()
168+void display_banned_cpus(void)
169 {
170 char banned_cpus[1024] = "Banned CPU numbers: \0";
171 if(g_list_length(setup.banned_cpus) > 0) {
172@@ -221,7 +221,7 @@ void get_cpu(cpu_node_t *node, void *data __attribute__((unused)))
173 }
174 }
175
176-void handle_cpu_banning()
177+void handle_cpu_banning(void)
178 {
179 GList *tmp = g_list_copy_deep(all_cpus, copy_cpu_ban, NULL);
180 attrset(COLOR_PAIR(5));
181@@ -371,7 +371,7 @@ void print_irq_line(irq_t *irq, void *data)
182
183 }
184
185-void print_all_irqs()
186+void print_all_irqs(void)
187 {
188 int *line = malloc(sizeof(int));
189 *line = 4;
190@@ -418,13 +418,13 @@ void copy_irqs_from_nodes(cpu_node_t *node, void *data __attribute__((unused)))
191 }
192 }
193
194-void get_all_irqs()
195+void get_all_irqs(void)
196 {
197 all_irqs = g_list_copy_deep(setup.banned_irqs, copy_irq, NULL);
198 for_each_node(tree, copy_irqs_from_nodes, NULL);
199 }
200
201-void handle_irq_banning()
202+void handle_irq_banning(void)
203 {
204 GList *tmp = g_list_copy_deep(all_irqs, copy_irq, NULL);
205 attrset(COLOR_PAIR(5));
206@@ -520,7 +520,7 @@ void handle_irq_banning()
207 }
208 }
209
210-void init()
211+void init(void)
212 {
213 signal(SIGINT, close_window);
214 initscr();
215@@ -556,7 +556,7 @@ void close_window(int sig __attribute__((unused)))
216 exit(EXIT_SUCCESS);
217 }
218
219-void settings()
220+void settings(void)
221 {
222 clear();
223 char *setup_data = get_data(SETUP);
224@@ -620,7 +620,7 @@ void settings()
225 free(setup_data);
226 }
227
228-void setup_irqs()
229+void setup_irqs(void)
230 {
231 clear();
232 get_all_irqs();
233@@ -720,7 +720,7 @@ void display_tree_node(cpu_node_t *node, void *data)
234 }
235 }
236
237-void display_tree()
238+void display_tree(void)
239 {
240 clear();
241 char *setup_data = get_data(SETUP);
242diff --git a/ui/ui.h b/ui/ui.h
243index 0aa8280..bb017e9 100644
244--- a/ui/ui.h
245+++ b/ui/ui.h
246@@ -15,39 +15,39 @@ extern GList *tree;
247 extern setup_t setup;
248 extern int is_tree;
249
250-void show_frame();
251-void show_footer();
252+void show_frame(void);
253+void show_footer(void);
254
255 char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset);
256 int get_valid_sleep_input(int column_offest);
257
258 void get_banned_cpu(int *cpu, void *data);
259 void print_cpu_line(cpu_ban_t *cpu, void *data);
260-void print_all_cpus();
261+void print_all_cpus(void);
262 void add_banned_cpu(int *banned_cpu, void *data);
263-void display_banned_cpus();
264+void display_banned_cpus(void);
265 int toggle_cpu(GList *cpu_list, int cpu_number);
266 void get_new_cpu_ban_values(cpu_ban_t *cpu, void *data);
267-void get_cpu();
268-void handle_cpu_banning();
269+void get_cpu(cpu_node_t *node, void *data);
270+void handle_cpu_banning(void);
271
272 void copy_assigned_obj(int *number, void *data);
273 void print_assigned_objects_string(irq_t *irq, int *line_offset);
274 void print_irq_line(irq_t *irq, void *data);
275-void print_all_irqs();
276+void print_all_irqs(void);
277 int toggle_irq(GList *irq_list, int position);
278 void get_new_irq_ban_values(irq_t *irq, void *data);
279 void copy_irqs_from_nodes(cpu_node_t *node, void *data);
280-void get_all_irqs();
281-void handle_irq_banning();
282+void get_all_irqs(void);
283+void handle_irq_banning(void);
284
285-void init();
286+void init(void);
287 void close_window(int sig);
288-void settings();
289-void setup_irqs();
290+void settings(void);
291+void setup_irqs(void);
292 void display_tree_node_irqs(irq_t *irq, void *data);
293 void display_tree_node(cpu_node_t *node, void *data);
294-void display_tree();
295+void display_tree(void);
296
297
298 #endif /* UI_H */
diff --git a/recipes-extended/irqbalance/irqbalance_git.bb b/recipes-extended/irqbalance/irqbalance_git.bb
index 46b8ed0f..491264db 100644
--- a/recipes-extended/irqbalance/irqbalance_git.bb
+++ b/recipes-extended/irqbalance/irqbalance_git.bb
@@ -4,13 +4,12 @@
4 4
5require irqbalance.inc 5require irqbalance.inc
6 6
7SRCREV = "b3adb5fd1496833e4e2cebc958d3919178cd5e3d" 7SRCREV = "4c234853d5ac9f13d8fe6b618d41a44161de509b"
8PV = "1.8.0+git" 8PV = "1.9.4+git"
9 9
10SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \ 10SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \
11 file://add-initscript.patch \ 11 file://add-initscript.patch \
12 file://irqbalance-Add-status-and-reload-commands.patch \ 12 file://irqbalance-Add-status-and-reload-commands.patch \
13 file://0001-add-void-to-fix-strict-prototypes.patch \
14 " 13 "
15 14
16CFLAGS += "-Wno-error=format-security" 15CFLAGS += "-Wno-error=format-security"