Libvirt KVM: Huge pages need to be mapped shared to allow vhostuser access
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mirantis OpenStack |
In Progress
|
High
|
MOS Maintenance |
Bug Description
Upstream bug: https:/
By default, when a KVM guest is setup using huge pages, the pages are mapped using the MAP_PRIVATE flag to mmap().
The vhostuser VIF backend is designed to allow an external process to provide the QEMU network driver functionality. For some usecases of vhostuser, this requires that the external process be able to access the QEMU guest's memory pages directly. This is not possible when the hugepages are mapped with MAP_PRIVATE - they must use MAP_SHARED instead.
The result is that current Nova hugepages config doesn't work too well with vhostuser VIF backend.
The fix to this is to tell libvirt to use a shared mapping for huge pages
http://
eg:
...
<cpu>
...
<numa>
<cell id='0' cpus='0-3' memory='512000' unit='KiB' memAccess=
<cell id='1' cpus='4-7' memory='512000' unit='KiB' memAccess=
</numa>
...
</cpu>
...
notice the addition of the memAccess attribute.
There is no serious downside to using shared mappings, so Nova might as well just unconditionally request them all the time.
Changed in mos: | |
assignee: | nobody → Roman Podoliaka (rpodolyaka) |
tags: | added: area-nova contrail |
Fix proposed to branch: openstack- ci/fuel- 7.0/2015. 1.0 /review. fuel-infra. org/18687
Change author: Daniel P. Berrange <email address hidden>
Review: https:/