A few SQM benchmarks

Someone asked about setting smp_affinity for the ASIX USB 3.0 gigabit Ethernet adapter. I got an error when trying to assign the USB xhci_hcd smp_affinity, so I settled for this in /etc/rc.local. Perhaps I should try moving these interrupts to CPU1 and CPU2 instead, so that they both avoid CPU0 where the xhci_hcd interrupt ends up.

#CPU0 - eth0 189
echo "1" >/proc/irq/31/smp_affinity
#CPU1 - eth0 190
echo "2" >/proc/irq/32/smp_affinity

Here is how /proc/interrupts looked at the end of the Pi 4 run. It does seem to help, on the order of 10%.

           CPU0       CPU1       CPU2       CPU3       
  3:     193942       3388      10035       3321     GICv2  30 Level     arch_timer
 11:        651          0          0          0     GICv2  65 Level     fe00b880.mailbox
 14:          2          0          0          0     GICv2 153 Level     uart-pl011
 17:         45          0          0          0     GICv2 114 Level     DMA IRQ
 24:          1          0          0          0     GICv2  66 Level     VCHIQ doorbell
 25:       7867          0          0          0     GICv2 158 Level     mmc1, mmc0
 31:    5300912          0          0          0     GICv2 189 Level     eth0
 32:          2   13432486          0          0     GICv2 190 Level     eth0
 38:          0          0          0          0     GICv2 175 Level     PCIe PME, aerdrv
 39:   21892839          0          0          0  BRCM STB PCIe MSI 524288 Edge      xhci_hcd
IPI0:      4198     121454     450517       1689       Rescheduling interrupts
IPI1:        35        408        358        297       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:     21932      22447      56546        223       IRQ work interrupts
IPI6:         0          0          0          0       CPU wake-up interrupts
Err:          0

For comparison, here is /proc/interrupts at the end of one of the Atomic Pi runs.

            CPU0       CPU1       CPU2       CPU3       
   0:         22          0          0          0   IO-APIC    2-edge      timer
   4:          0          0         12          0   IO-APIC    4-edge      ttyS0
   8:          0          0          0          0   IO-APIC    8-fasteoi   rtc0
   9:          0          0          0          0   IO-APIC    9-fasteoi   acpi
 116:          0          0          0        459   PCI-MSI 32768-edge      i915
 118:   23674708          0          0          0   PCI-MSI 327680-edge      xhci_hcd
 119:          0          0          0   23935736   PCI-MSI 524288-edge      eth0
 NMI:          0          0          0          0   Non-maskable interrupts
 LOC:     277526     279505     278958     277853   Local timer interrupts
 SPU:          0          0          0          0   Spurious interrupts
 PMI:          0          0          0          0   Performance monitoring interrupts
 IWI:          0          0          0          0   IRQ work interrupts
 RTR:          0          0          0          0   APIC ICR read retries
 RES:        401       1021       2140       2425   Rescheduling interrupts
 CAL:        608        321        987        875   Function call interrupts
 TLB:          0          0          0          0   TLB shootdowns
 TRM:          0          0          0          0   Thermal event interrupts
 THR:          0          0          0          0   Threshold APIC interrupts
 DFR:          0          0          0          0   Deferred Error APIC interrupts
 MCE:          0          0          0          0   Machine check exceptions
 MCP:          4          4          4          4   Machine check polls
 ERR:          0
 MIS:          0
 PIN:          0          0          0          0   Posted-interrupt notification event
 NPI:          0          0          0          0   Nested posted-interrupt event
 PIW:          0          0          0          0   Posted-interrupt wakeup event