Irq balancing

After noticing a bit of high cpu on a simple pedalboard on my mod duo I decided to have a look at whats happening under the hood. One of the first things I tend to look at when working on embedded systems is the interrupt load, from what I can see the interrupts are mostly running on CPU0. Has anyone investigated using irqbalance or manually redistributing the irqs?

[root@modduo ~]# cat /proc/interrupts 
        CPU0       CPU1       
 29:    2192210      93795       GIC  arch_timer
 30:          0          0       GIC  arch_timer
 32:          0          0       GIC  axp_mfd
 33:         24          0       GIC  serial
 35:      51923          0       GIC  serial
 39:       6788          0       GIC  sunxi-i2c.0
 49:          0          0       GIC  serial
 50:        133          0       GIC  serial
 54:          0          0       GIC  timer0
 55:          6          0       GIC  aw_clock_event
 59:      22682     443749       GIC  dma_irq
 60:          0          0       GIC  sunxi-gpio
 64:          0          0       GIC  sunxi-mmc
 69:        291          0       GIC  nand
 70:       7509          0       GIC  sw_usb_udc
 71:          2          0       GIC  ehci_hcd:usb2
 96:         26          0       GIC  ohci_hcd:usb3
120:         50         44       GIC  sunxi-i2c.3
121:      11068          0       GIC  sunxi-i2c.4
IPI0:          0          0  Timer broadcast interrupts
IPI1:    1157404     816132  Rescheduling interrupts
IPI2:          0          0  Function call interrupts
IPI3:         10          1  Single function call interrupts
IPI4:          0          0  CPU stop interrupts
IPI5:          0          0  CPU backtrace
Err:          0

One of the CPUs on the Duo, due to sunxi bad code we guess, is not suitable for RT usage.
This was a hard problem to find (remember sporadic xruns on the first Duo software releases?).
Basically one of the CPU cores has a very “high” latency (high when it comes to audio) and which CPU specifically is random. So during boot we discover which CPU is “bad” and assign DMA and all other important things to it, leaving everything else on the other.

In your post you see CPU 2 has a lot of DMA IRQ interrupts, that means the CPU 1 was the problematic one.

We hope that when we move to the mainline kernel, this will not be an issue anymore.


Ok, thanks for the detailed response. I’ve not had a mod duo for long so I’m not aware of the xrun issues, but thanks for going into it all. I’ve had to use sunxi kernels on some work projects, so I feel your pain. Lets just hope that moving to mainline does resolve this.