Add basic support for hugepages

This patch adds basic support for running Nova/libvirt with hugepages
enabled. The /dev/hugepages mount point and the mem_page_size flavor
property are hardcoded for the scope of this patch.

This change is a dependency for DPDK enablement in fuel-ccp-neutron.

Change-Id: I0a22bbe4a81d845af743275c6c9c91de7d9ae464
This commit is contained in:
Ilya Chukhnakov 2017-03-10 00:45:34 +03:00
parent 8368c5da0a
commit f2643a67d2
3 changed files with 14 additions and 1 deletions

View File

@ -20,5 +20,12 @@ export OS_AUTH_URL="{{ address('keystone', keystone.admin_port, with_scheme=True
export OS_CACERT="/opt/ccp/etc/tls/ca.pem"
{% endif %}
flavor_params="--id $id"
flavor_params+=" --ram $ram"
flavor_params+=" --disk $disk"
flavor_params+=" --vcpus $vcpus"
{% if nova.libvirt.hugepages %}
flavor_params+=" --property hw:mem_page_size=large"
{% endif %}
openstack flavor show $name || openstack --os-region-name=RegionOne \
flavor create --id $id --ram $ram --disk $disk --vcpus $vcpus $name
flavor create $flavor_params $name

View File

@ -30,6 +30,7 @@ configs:
virt_type: "kvm"
libvirt:
hugepages: false
tls:
enabled: true

View File

@ -32,6 +32,11 @@ service:
type: host
path: /dev
# {% endif %}
# {% if nova.libvirt.hugepages %}
- name: hugepages
type: host
path: /dev/hugepages
# {% endif %}
pre:
- name: nova-libvirt-bootstrap
command: /tmp/nova-libvirt-bootstrap.sh