Browse Source

system.hugepages: sysctl vm.nr_hugepages

Allow hugepages to be used right away. This is a best effort attempt,
as memory might be too fragmented to free enough contiguous regions
for all hugepages, so early allocation during boot remains the norm.

This allows using ovs-switchd-dpdk without rebooting the node first.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
pull/145/head
Alexandru Avadanii 6 years ago
parent
commit
5e035c2307
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      linux/system/hugepages.sls

+ 7
- 0
linux/system/hugepages.sls View File

- mkmnt: true - mkmnt: true
- opts: mode=775,pagesize={{ hugepages.size }} - opts: mode=775,pagesize={{ hugepages.size }}


# 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`
hugepages_sysctl_vm_nr_hugepages:
cmd.run:
- name: "sysctl vm.nr_hugepages={{ hugepages.count }}"
- unless: "sysctl vm.nr_hugepages | grep -qE '{{ hugepages.count }}'"

{%- endif %} {%- endif %}


{%- endfor %} {%- endfor %}

Loading…
Cancel
Save