]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
JAM: modified scripts to set cpu affinity for eth interrupts on eventbuilders
authorHadaq Hades <hadaq@lxhadesdaq>
Fri, 14 Mar 2014 09:32:41 +0000 (10:32 +0100)
committerHadaq Hades <hadaq@lxhadesdaq>
Fri, 14 Mar 2014 09:32:41 +0000 (10:32 +0100)
now we have dedicated scripts for each EB server, lxhadeb05 is treated specially since there are several interrupts assigned eth
added cpu affinity for gsi eth tx/rx interrupts (<- makes difference when rfio socket is active at high eventrate!)

utils/move_doublecpu_irq.sh
utils/set_eth_affinity.sh [new file with mode: 0755]
utils/set_eth_affinity_lxhadeb05.sh [new file with mode: 0755]

index f2f06e8415cc10a161957e1820f6fbf332cab97a..5e4aa12dc452d336f69091e086a781f2b14c3d15 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/bash
-#ssh root@lxhadeb01 'echo 000000 > /proc/irq/1272/smp_affinity'
-ssh root@lxhadeb02 'echo c > /proc/irq/1272/smp_affinity'
-ssh root@lxhadeb03 'echo c > /proc/irq/1272/smp_affinity'
-ssh root@lxhadeb04 'echo c > /proc/irq/1272/smp_affinity'
-#ssh root@lxhadeb05 'echo 0c > /proc/irq/31/smp_affinity;echo 03 > /proc/irq/32/smp_affinity;echo 03 > /proc/irq/33/smp_affinity;'
-ssh root@lxhadeb05 'echo 0c > /proc/irq/77/smp_affinity;echo 03 > /proc/irq/78/smp_affinity;echo 03 > /proc/irq/79/smp_affinity;'
-# todo- will go up to irq/100 JAM
-#ssh root@lxhadeb05 'echo 030 > /proc/irq/46/smp_affinity;echo 0c0 > /proc/irq/47/smp_affinity;echo 300 > /proc/irq/48/smp_affinity;echo c00 > /proc/irq/49/smp_affinity;'
+# JAM moved actual setting of interrupt affinities to scripts on target machines
+#ssh root@lxhadeb01 '/root/bin/set_eth_affinity.sh'
+ssh root@lxhadeb02 '/root/bin/set_eth_affinity.sh'
+ssh root@lxhadeb03 '/root/bin/set_eth_affinity.sh'
+ssh root@lxhadeb04 '/root/bin/set_eth_affinity.sh'
+ssh root@lxhadeb05 '/root/bin/set_eth_affinity_lxhadeb05.sh'
 
diff --git a/utils/set_eth_affinity.sh b/utils/set_eth_affinity.sh
new file mode 100755 (executable)
index 0000000..6606ee5
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# JAM this one is to set irq affinities on EB nodes 2,3,4
+# todo: evaluate irq numbers for eth3-rx and eth2-tx automatically from /proc/interrupts
+# this is left as exercise to the reader :)
+# first receiving udp from eth3:
+  echo 100 > /proc/irq/1272/smp_affinity; 
+# then sending rfio to gsi via eth2
+  echo 200 > /proc/irq/1274/smp_affinity;
+# maybe we need to set receive on eth2 too:
+  echo 400 > /proc/irq/1275/smp_affinity;    
+echo setting irq affinities on $HOSTNAME                          
+
+
+
+
diff --git a/utils/set_eth_affinity_lxhadeb05.sh b/utils/set_eth_affinity_lxhadeb05.sh
new file mode 100755 (executable)
index 0000000..b9da486
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+# JAM this one is to set irq affinities on EB nodes
+# todo: evaluate irq numbers for eth4-rx and eth5-tx automatically from /proc/interrupts
+# this is left as exercise to the reader :)
+# first receiving udp from eth4:
+for ((irq=77; irq <= 100 ; irq++))  
+do
+  #echo -n "$irq "; echo 
+  echo FF00 > /proc/irq/$irq/smp_affinity; 
+done 
+# then sending rfio to gsi via eth5
+for ((irq=52; irq <= 75 ; irq++))
+do
+  #echo -n "$irq"; echo 
+  echo FF0000 > /proc/irq/$irq/smp_affinity; 
+done
+# finally receiving via eth5 (rfio protol is tcpi)
+for ((irq=28; irq <= 51 ; irq++))
+do
+  #echo -n "$irq"; echo
+  echo FF0000 > /proc/irq/$irq/smp_affinity;
+done
+
+
+echo setting irq affinities on $HOSTNAME                          
+
+
+
+