From: Laurent Mazet Date: Wed, 14 Jan 2015 14:12:22 +0000 (+0100) Subject: set irq for eth0 on core 1, 2, 3, 4 and 5 to reduce load on core 0 X-Git-Tag: debian_7.8.1~19 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=5316baff11343ab3b6a495a4f232c62e5280afb1;p=debian6500.git set irq for eth0 on core 1, 2, 3, 4 and 5 to reduce load on core 0 --- 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