소스 검색

Force usage of noop scheduler for virtual disks on Xen domUs

Emmanuel Bouthenot 9 년 전
부모
커밋
3ad5f30c65
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      roles/common/tasks/base.yml
  2. 5 0
      roles/common/templates/kernel/sysfs.d/10-disks.conf.j2

+ 0 - 1
roles/common/tasks/base.yml

@@ -107,7 +107,6 @@
       - 10-disks.conf
   notify:
     - Refresh sysfs configuration
-  when: sysfs_disk_settings
 
 - name: Install sudo configuration
   template: src=sudo/local-admin.j2 dest=/etc/sudoers.d/local-admin owner=root group=root mode=0440

+ 5 - 0
roles/common/templates/kernel/sysfs.d/10-disks.conf.j2

@@ -1,6 +1,11 @@
 #
 # sysfs: disk settings / tuning
 #
+{% if ansible_virtualization_type is defined and ansible_virtualization_type == 'xen' and ansible_virtualization_role == 'guest' %}
+{% for disk in ansible_devices %}
+block/{{ disk }}/queue/scheduler = noop
+{% endfor %}
+{% endif %}
 {% if sysfs_disk_settings %}
 {% for disk in ansible_devices -%}
 {% for key in sysfs_disk_settings %}