11-15-2019, 04:05 AM
(This post was last modified: 11-15-2019, 05:27 AM by Arglebargle.)
So apparently the APIC on rk3399 doesn't handle interrupts broadcast to multiple cores very well. When it receives a broadcast interrupt for multiple possible cores it just hands it to the first core in the given range without broadcasting to all of them. The default range for interrupts is set to all cpu cores (0-5) so almost all interrupts are presently being serviced by poor frequently-interrupted cpu0.
I tried running irqbalance last night to solve this easily but apparently irqbalance also likes to assign ranges of cpus or it's otherwise not functional out of the box without :effort: so I cribbed some of armbian's simple boot-time performance code and distributed interrupts manually. Desktop performance is noticeably less laggy, and while it's not anything amazing it's a decent improvement.
If anyone's interested in trying this out here's the irq assignment script and boot-time service file:
https://gist.github.com/foundObjects/76d...81e80f1eb8
Instructions are commented in each file. Comment out the root remount line, you probably don't need it. You might also want to juggle the cpu cores pcie, mmc1 and USB3 land on depending on which you're using on your system. Cores 0-3 are the little cluster, 4-5 big.
This really isn't the optimal way to distribute interrupts but it's better than nothing at all, let me know if there's anything obvious I missed.
edit: If you just want to try this out without installing it for every boot just read the script then run it once as root, interrupt assignment only stays in effect until reboot.
I tried running irqbalance last night to solve this easily but apparently irqbalance also likes to assign ranges of cpus or it's otherwise not functional out of the box without :effort: so I cribbed some of armbian's simple boot-time performance code and distributed interrupts manually. Desktop performance is noticeably less laggy, and while it's not anything amazing it's a decent improvement.
If anyone's interested in trying this out here's the irq assignment script and boot-time service file:
https://gist.github.com/foundObjects/76d...81e80f1eb8
Instructions are commented in each file. Comment out the root remount line, you probably don't need it. You might also want to juggle the cpu cores pcie, mmc1 and USB3 land on depending on which you're using on your system. Cores 0-3 are the little cluster, 4-5 big.
This really isn't the optimal way to distribute interrupts but it's better than nothing at all, let me know if there's anything obvious I missed.
edit: If you just want to try this out without installing it for every boot just read the script then run it once as root, interrupt assignment only stays in effect until reboot.