Ver código fonte

Mend hugepages config

* make unique mounted device
* hugepages realtime setup for default pagesize only

Change-Id: Ifa369f62a993c59c7b2c471b273fa795cc794e24
Closes-Bug: PROD-19825
pull/143/merge
Michael Polenchuk 6 anos atrás
pai
commit
d9369fe835
2 arquivos alterados com 4 adições e 5 exclusões
  1. +1
    -1
      README.rst
  2. +3
    -4
      linux/system/hugepages.sls

+ 1
- 1
README.rst Ver arquivo

@@ -603,7 +603,7 @@ with memory allocation/deallocation by decreasing memory fragmentation.
size: 2M
count: 107520
mount_point: /mnt/hugepages_2MB
mount: false/true # default false
mount: false/true # default is true (mount immediately) / false (just save in the fstab)
large:
default: true # default automatically mounted
size: 1G

+ 3
- 4
linux/system/hugepages.sls Ver arquivo

@@ -19,23 +19,22 @@ include:

{%- for hugepages_type, hugepages in system.kernel.hugepages.items() %}

{%- if hugepages.get('mount', False) or hugepages.get('default', False) %}

hugepages_mount_{{ hugepages_type }}:
mount.mounted:
- name: {{ hugepages.mount_point }}
- device: Hugetlbfs-kvm
- device: Hugetlbfs-kvm-{{ hugepages.size|lower }}
- fstype: hugetlbfs
- mkmnt: true
- opts: mode=775,pagesize={{ hugepages.size }}
- mount: {{ hugepages.mount|default('true') }}

# Make hugepages available right away with a temporary systctl write
# This will be handled via krn args after reboot, so don't use `sysctl.present`
{%- if hugepages.get('default', False) %}
hugepages_sysctl_vm_nr_hugepages:
cmd.run:
- name: "sysctl vm.nr_hugepages={{ hugepages.count }}"
- unless: "sysctl vm.nr_hugepages | grep -qE '{{ hugepages.count }}'"

{%- endif %}

{%- endfor %}

Carregando…
Cancelar
Salvar