Add IRQ/RCU/Writeback pinning to ansible 18/7518/1
authorPeter Mikus <pmikus@cisco.com>
Tue, 11 Jul 2017 12:44:13 +0000 (14:44 +0200)
committerPeter Mikus <pmikus@cisco.com>
Tue, 11 Jul 2017 12:44:13 +0000 (14:44 +0200)
Change-Id: I650d9cb1ee44b6fa7cee79a86dad2b515256b239
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/tools/testbed-setup/playbooks/01-host-setup.yaml

index 8fa9d66..4401fbb 100644 (file)
     copy: src=files/requirements.txt dest=/tmp/requirements.txt
   - name: Install PIP requirements
     pip: requirements=/tmp/requirements.txt
+  - name: IRQ pinning
+    lineinfile:
+        dest: /etc/rc.local
+        insertbefore: '^exit 0'
+        line: 'for l in `ls /proc/irq`; do echo 1 | sudo tee /proc/irq/$l/smp_affinity; done'
+  - name: RCU pinning
+    lineinfile:
+        dest: /etc/rc.local
+        insertbefore: '^exit 0'
+        line: 'for i in `pgrep rcu[^c]` ; do sudo taskset -pc 0 $i ; done'
+  - name: CPU writeback mask
+    lineinfile:
+        dest: /etc/rc.local
+        insertbefore: '^exit 0'
+        line: 'echo 1 | sudo tee /sys/bus/workqueue/devices/writeback/cpumask'
 - hosts: tg
   remote_user: testuser
   sudo: yes

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.