Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
869B

  1. {%- from "linux/map.jinja" import system with context %}
  2. include:
  3. - linux.system.grub
  4. {%- if "pse" in grains.cpu_flags or "pdpe1gb" in grains.cpu_flags %}
  5. /etc/default/grub.d/90-hugepages.cfg:
  6. file.managed:
  7. - source: salt://linux/files/grub_hugepages
  8. - template: jinja
  9. - require:
  10. - file: grub_d_directory
  11. {%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
  12. - watch_in:
  13. - cmd: grub_update
  14. {%- endif %}
  15. {%- for hugepages_type, hugepages in system.kernel.hugepages.iteritems() %}
  16. {%- if hugepages.get('mount', False) or hugepages.get('default', False) %}
  17. hugepages_mount_{{ hugepages_type }}:
  18. mount.mounted:
  19. - name: {{ hugepages.mount_point }}
  20. - device: Hugetlbfs-kvm
  21. - fstype: hugetlbfs
  22. - mkmnt: true
  23. - opts: mode=775,pagesize={{ hugepages.size }}
  24. {%- endif %}
  25. {%- endfor %}
  26. {%- endif %}