mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
qca-nss-drv: optimize smp_affinity for nss cores
This commit is contained in:
parent
61fcbbedb7
commit
93743e3123
@ -18,24 +18,35 @@
|
||||
START=70
|
||||
|
||||
enable_rps() {
|
||||
irq_nss_rps=`grep nss_queue1 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
irq_nss_rps=$(grep nss_queue1 /proc/interrupts | cut -d ':' -f 1 | tr -d ' ')
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 2 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
irq_nss_rps=`grep nss_queue2 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
irq_nss_rps=$(grep nss_queue2 /proc/interrupts | cut -d ':' -f 1 | tr -d ' ')
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 4 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
irq_nss_rps=`grep nss_queue3 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
irq_nss_rps=$(grep nss_queue3 /proc/interrupts | cut -d ':' -f 1 | tr -d ' ')
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 8 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
irq_nss_rps=$(grep nss_queue0 /proc/interrupts | cut -d ':' -f 1 | tr -d ' ')
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 8 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
awk '/nss_empty_buf/{sub(/:/,""); print $1}' /proc/interrupts|while read -r entry
|
||||
do
|
||||
echo 4 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
# Enable NSS RPS
|
||||
sysctl -w dev.nss.rps.enable=1 >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user