Page MenuHomeVyOS Platform

smp-affinity required by some platforms but doesn't exists in the CLI
Open, NormalPublicBUG

Description

SMP-affinity was dropped in T3048 commit
But in some platforms (for example XEN, XCP-NG) that cause that all IRQs bind to a single CPU core

vyos@rxen:~$ sudo cat /proc/interrupts 
            CPU0       CPU1       
...

  61:          1          0  xen-dyn-lateeoi     -event     hvc_console
  62:         33          0  xen-dyn-lateeoi     -event     vif0-q0-tx
  63:         19          0  xen-dyn-lateeoi     -event     vif0-q0-rx
  64:          9          0  xen-dyn-lateeoi     -event     vif0-q1-tx
  65:          6          0  xen-dyn-lateeoi     -event     vif0-q1-rx
  66:       3001          0  xen-dyn-lateeoi     -event     blkif
  67:         53          0  xen-dyn-lateeoi     -event     vif1-q0-tx
  68:       3528          0  xen-dyn-lateeoi     -event     vif1-q0-rx
  69:       5145          0  xen-dyn-lateeoi     -event     vif1-q1-tx
  70:       2664          0  xen-dyn-lateeoi     -event     vif1-q1-rx

To work around it download the script irq-affinity from 1.2 and execute it manually

sudo wget -O /config/scripts/irq-affinity.pl https://raw.githubusercontent.com/vyos/vyatta-cfg-system/crux/scripts/system/irq-affinity.pl
sudo perl /config/scripts/irq-affinity.pl eth0 auto

1.2 Because it contains CPU detection code for "XEN"

Maybe we should return CLI set interface ethernet ethX smp-affinity auto as an option

One question is should we use old Perl code or rewrite it to Python.

Details

Version
1.3.2
Is it a breaking change?
Perfectly compatible

Event Timeline

dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin changed Issue type from Unspecified (please specify) to improvement.

@syncer What I know only from XEN or XCP-NG was reported
Do no have reports from other platforms

@Viacheslav, maybe we should just run the script on such platforms instead of doing CLI?

@syncer In my opinion, it is better to have a CLI that can process network interrupts only by the local NUMA node.
As I remember, the set system option performance xxx option overrides some sysctl options if it is not fixed.
Otherwise, we have to use customer scripts to balance interrupts on the required cores.