Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.05] irqbalance: Fix log spam and correct meson version #22851

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

hnyman
Copy link
Contributor

@hnyman hnyman commented Dec 9, 2023

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.

This errors seems to surface on 23.05 only on some devices, but not all.
And when I briefly tested, the unpatched 1.9.3 seemed to work in R7800 main/master build (with kernel 6.1) but fail with 23.05. So I initially author this fix just for 23.05

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

Maintainer: me
Run tested: ipq806x/R7800

I wrote a comment upstream. Interesting to see their views.
Irqbalance/irqbalance#269 (comment)

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>
@hnyman hnyman added the OpenWrt 23.05 Issue/PR on branch 23.05 label Dec 9, 2023
@hnyman hnyman self-assigned this Dec 9, 2023
@hnyman hnyman merged commit 0e789a6 into openwrt:openwrt-23.05 Dec 9, 2023
12 checks passed
@hnyman hnyman deleted the irqfix branch December 9, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenWrt 23.05 Issue/PR on branch 23.05
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant