Add Skylake optimization to ansible
[csit.git] / resources / tools / testbed-setup / ansible / roles / tg_sut / tasks / main.yaml
index eeaeed4..1774134 100644 (file)
@@ -52,7 +52,7 @@
     path: '/etc/default/grub'\r
     state: 'present'\r
     regexp: '^GRUB_CMDLINE_LINUX='\r
-    line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt"'\r
+    line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"'\r
   notify: ['Update GRUB']\r
   tags: set-grub\r
 \r
   tags: install-pip\r
 \r
 - name: Load vfio-pci by default\r
-  raw: 'echo vfio-pci | sudo tee -a /etc/modules'\r
+  lineinfile:\r
+    path: '/etc/modules'\r
+    state: 'present'\r
+    line: 'vfio-pci'\r
   tags: load-vfio-pci\r
+\r
+- name: Load msr by default\r
+  lineinfile:\r
+    path: '/etc/modules'\r
+    state: 'present'\r
+    line: 'msr'\r
+  tags: disable-turbo-boost\r
+\r
+- name: Disable Turbo-Boost by service\r
+  copy:\r
+    src: 'files/disable-turbo-boost.service'\r
+    dest: '/etc/systemd/system/disable-turbo-boost.service'\r
+    owner: 'root'\r
+    group: 'root'\r
+    mode: '0644'\r
+  when: >\r
+        inventory_hostname in groups['skylake']\r
+  tags: disable-turbo-boost\r
+\r
+- name: Disable Turbo-Boost by service on startup\r
+  service:\r
+    name: disable-turbo-boost\r
+    enabled: yes\r
+  when: >\r
+        inventory_hostname in groups['skylake']\r
+  tags: disable-turbo-boost\r