From 5316baff11343ab3b6a495a4f232c62e5280afb1 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Wed, 14 Jan 2015 15:12:22 +0100 Subject: [PATCH] set irq for eth0 on core 1, 2, 3, 4 and 5 to reduce load on core 0 --- master/opt/cluster/acq/etc/rc.local | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 master/opt/cluster/acq/etc/rc.local diff --git a/master/opt/cluster/acq/etc/rc.local b/master/opt/cluster/acq/etc/rc.local new file mode 100755 index 0000000..fd73c36 --- /dev/null +++ b/master/opt/cluster/acq/etc/rc.local @@ -0,0 +1,23 @@ +#!/bin/bash -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# distribute interrupt for eth0 on core 1-5 +core=(2 4 8 16 32) +l=0 +for i in $(awk '/eth0/ {sub(/:/, ""); print $1}' /proc/interrupts); do + echo ${core[$l]} > /proc/irq/$i/smp_affinity + let l++ + [ $l -eq 5 ] && l=0 +done + +exit 0 -- 2.30.2