aboutsummaryrefslogtreecommitdiff
path: root/utils/irqbalance
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2023-12-09 12:13:27 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2023-12-09 12:13:27 +0200
commit78c4791f4248a3a65da6dce07cc528889080a3ef (patch)
tree344ba2cdb1fa36a47cbc5ed849082a1f837a06bd /utils/irqbalance
parenta6089c1fe7d8a11f32807382b133d471273bf7cc (diff)
irqbalance: Fix log spam and correct meson version
Irqbalance 1.9.3 changed the handling of certain errors. Specifically EINVAL, trying to set an invalid CPU core, was changed to be a temporary error, causing log spam from repeated balancing runs in some devices. See log and strace below. Mark EINVAL as permanent. Also correct the version in our own meson.build patch. Log and strace: Sat Dec 9 10:17:27 2023 daemon.warn irqbalance: Cannot change IRQ 48 affinity: Invalid argument open("/proc/irq/48/smp_affinity", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 6 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6ed9000 ioctl(6, TIOCGWINSZ, 0xbeb134e8) = -1 ENOTTY (Not a tty) writev(6, [{iov_base="00000001", iov_len=8}, {iov_base=NULL, iov_len=0}], 2) = -1 EINVAL (Invalid argument) close(6) = 0 munmap(0xb6ed9000, 4096) = 0 clock_gettime64(CLOCK_REALTIME, {tv_sec=1702109847, tv_nsec=340549081}) = 0 sendto(5, "<28>Dec 9 08:17:27 irqbalance: "..., 80, 0, NULL, 0) = 80 writev(1, [{iov_base="Cannot change IRQ 48 affinity: I"..., iov_len=47}, {iov_base="\n", iov_len=1}], 2Cannot change IRQ 48 affinity: Invalid argument ) = 48 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'utils/irqbalance')
-rw-r--r--utils/irqbalance/Makefile2
-rw-r--r--utils/irqbalance/patches/010-meson.patch5
-rw-r--r--utils/irqbalance/patches/020-mark-EINVAL-error-permanent.patch15
3 files changed, 20 insertions, 2 deletions
diff --git a/utils/irqbalance/Makefile b/utils/irqbalance/Makefile
index 23d4b3899..83f07da84 100644
--- a/utils/irqbalance/Makefile
+++ b/utils/irqbalance/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=irqbalance
PKG_VERSION:=1.9.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Irqbalance/irqbalance.git
diff --git a/utils/irqbalance/patches/010-meson.patch b/utils/irqbalance/patches/010-meson.patch
index 7e3ae36d8..71a8ebae7 100644
--- a/utils/irqbalance/patches/010-meson.patch
+++ b/utils/irqbalance/patches/010-meson.patch
@@ -4,6 +4,9 @@ Date: Fri, 10 Jun 2022 23:14:27 -0700
Subject: [PATCH] add meson
Signed-off-by: Rosen Penev <rosenp@gmail.com>
+
+[update version string to 1.9.3]
+
---
meson.build | 43 +++++++++++++++++++++++++++++++++++++++++++
meson_options.txt | 11 +++++++++++
@@ -15,7 +18,7 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
+++ b/meson.build
@@ -0,0 +1,43 @@
+project('irqbalance', 'c',
-+ version : '1.9.0',
++ version : '1.9.3',
+ default_options : ['warning_level=1']
+)
+
diff --git a/utils/irqbalance/patches/020-mark-EINVAL-error-permanent.patch b/utils/irqbalance/patches/020-mark-EINVAL-error-permanent.patch
new file mode 100644
index 000000000..44eb15dc0
--- /dev/null
+++ b/utils/irqbalance/patches/020-mark-EINVAL-error-permanent.patch
@@ -0,0 +1,15 @@
+--- a/activate.c
++++ b/activate.c
+@@ -98,11 +98,11 @@ error:
+ case ENOSPC: /* Specified CPU APIC is full. */
+ case EAGAIN: /* Interrupted by signal. */
+ case EBUSY: /* Affinity change already in progress. */
+- case EINVAL: /* IRQ would be bound to no CPU. */
+ case ERANGE: /* CPU in mask is offline. */
+ case ENOMEM: /* Kernel cannot allocate CPU mask. */
+ /* Do not blacklist the IRQ on transient errors. */
+ break;
++ case EINVAL: /* IRQ would be bound to no CPU. */
+ default:
+ /* Any other error is considered permanent. */
+ info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED;