← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1447079] Re: Libvirt KVM: Huge pages need to be mapped shared to allow vhostuser access

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => liberty-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1447079

Title:
  Libvirt KVM: Huge pages need to be mapped shared to allow vhostuser
  access

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  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://libvirt.org/formatdomain.html#elementsCPU

  eg:

    ...
    <cpu>
      ...
      <numa>
        <cell id='0' cpus='0-3' memory='512000' unit='KiB' memAccess='shared'/>
        <cell id='1' cpus='4-7' memory='512000' unit='KiB' memAccess='shared'/>
      </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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1447079/+subscriptions


References