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
- 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 %} |