Netgear R7800 exploration (IPQ8065, QCA9984)

I was able to get irqbalance compiled. It distributed interrupts rather nicely.

Makefile https://gist.github.com/hnyman/c01b7d1d5e00cc9eea89f6eb4e7e0f27#file-irqbalance-makefile
Additional patch (patches/100-disable-ui-compilation.patch):
https://gist.github.com/hnyman/c01b7d1d5e00cc9eea89f6eb4e7e0f27#file-patch-100-disable-ui-compilation-patch

I made a rather rough first version: I disabled practically all optional functionality, opted to use the external glib2 (that adds a large package dependency) and disabled compilation of the UI, as that gave some errors on the first build attempts.

Below is what happened. I ran "oneshot IRQ balancing" and after a while it can be noticed that 27/qcom-pcie-msi, 31/eth1, 104/ath10k_pci got moved. So both fixed and wlan interrupts got split to different cores.

root@LEDE:/tmp# irqbalance --oneshot
...
root@LEDE:/tmp# cat /proc/interrupts
           CPU0       CPU1
 16:    1038754     541144       GIC  18 Edge      gp_timer
 18:         33          0       GIC  51 Edge      qcom_rpm_ack
 19:          0          0       GIC  53 Edge      qcom_rpm_err
 20:          0          0       GIC  54 Edge      qcom_rpm_wakeup
 26:          0          0       GIC 241 Edge      29000000.sata
 27:     689539      11246       GIC  67 Edge      qcom-pcie-msi
 28:     770553          0       GIC  89 Edge      qcom-pcie-msi
 29:     182217          0       GIC 202 Edge      adm_dma
 30:     329046          0       GIC 255 Level     eth0
 31:     535468      23525       GIC 258 Level     eth1
 32:          0          0       GIC 130 Level     bam_dma
 33:          0          0       GIC 128 Level     bam_dma
 40:          2          0   msmgpio   6 Edge      gpio-keys
 88:          2          0   msmgpio  54 Edge      gpio-keys
 99:          2          0   msmgpio  65 Edge      gpio-keys
103:          0          0   PCI-MSI   0 Edge      aerdrv
104:     689539      11246   PCI-MSI   1 Edge      ath10k_pci
136:          0          0   PCI-MSI   0 Edge      aerdrv
137:     770553          0   PCI-MSI   1 Edge      ath10k_pci
169:         14          0       GIC 184 Level     msm_serial0
170:          2          0       GIC 187 Level     1a280000.spi
171:          0          0       GIC 142 Level     xhci-hcd:usb1
172:        591          0       GIC 237 Level     xhci-hcd:usb3
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0          0  Timer broadcast interrupts
IPI2:      64319      94950  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:      16372     411777  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:          1          2  IRQ work interrupts
IPI7:          0          0  completion interrupts

IRQ affinity distribution:

root@LEDE:/tmp# cat /proc/irq/16/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/18/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/19/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/20/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/26/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/27/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/28/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/29/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/30/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/31/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/32/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/33/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/40/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/88/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/99/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/103/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/104/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/136/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/137/smp_affinity
3
root@LEDE:/tmp# cat /proc/irq/169/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/170/smp_affinity
1
root@LEDE:/tmp# cat /proc/irq/171/smp_affinity
2
root@LEDE:/tmp# cat /proc/irq/172/smp_affinity
1