← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1811870] [NEW] libvirt reporting incorrect value of 4k (small) pages

 

Public bug reported:

libvirt < 4.3.0 had an issue whereby assigning more than 4 GB of huge
pages would result in an incorrect value for the number of 4k (small)
pages. This was tracked and fixed via rhbz#1569678 and the fixes appear
to have been backported to the libvirt versions for RHEL 7.4+. However,
this is still an issue with the versions of libvirt available on Ubuntu
16.04, 18.04 and who knows what else. We should either alert the user
that the bug exists or, better again, work around the issue using the
rest of the (correct) values for different page sizes.

# Incorrect value (Ubuntu 16.04, libvirt 4.0.0)

$ virsh capabilities | xmllint --xpath /capabilities/host/topology/cells/cell[1] -
<cell id="0">
  <memory unit="KiB">16298528</memory>
  <pages unit="KiB" size="4">3075208</pages>
  <pages unit="KiB" size="2048">4000</pages>
  <pages unit="KiB" size="1048576">0</pages>
  ...
</cell>

(3075208 * 4) + (4000 * 2048) != 16298528

# Correct values (Fedora ??, libvirt 4.10)

$ virsh capabilities | xmllint --xpath /capabilities/host/topology/cells/cell[1] -
<cell id='0'>
  <memory unit='KiB'>32359908</memory>
  <pages unit='KiB' size='4'>8038777</pages>
  <pages unit='KiB' size='2048'>100</pages>
  <pages unit='KiB' size='1048576'>0</pages>
  ...
</cell>

(8038777 * 4) + (100 * 2048) == 32359908

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1569678

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1811870

Title:
  libvirt reporting incorrect value of 4k (small) pages

Status in OpenStack Compute (nova):
  New

Bug description:
  libvirt < 4.3.0 had an issue whereby assigning more than 4 GB of huge
  pages would result in an incorrect value for the number of 4k (small)
  pages. This was tracked and fixed via rhbz#1569678 and the fixes
  appear to have been backported to the libvirt versions for RHEL 7.4+.
  However, this is still an issue with the versions of libvirt available
  on Ubuntu 16.04, 18.04 and who knows what else. We should either alert
  the user that the bug exists or, better again, work around the issue
  using the rest of the (correct) values for different page sizes.

  # Incorrect value (Ubuntu 16.04, libvirt 4.0.0)

  $ virsh capabilities | xmllint --xpath /capabilities/host/topology/cells/cell[1] -
  <cell id="0">
    <memory unit="KiB">16298528</memory>
    <pages unit="KiB" size="4">3075208</pages>
    <pages unit="KiB" size="2048">4000</pages>
    <pages unit="KiB" size="1048576">0</pages>
    ...
  </cell>

  (3075208 * 4) + (4000 * 2048) != 16298528

  # Correct values (Fedora ??, libvirt 4.10)

  $ virsh capabilities | xmllint --xpath /capabilities/host/topology/cells/cell[1] -
  <cell id='0'>
    <memory unit='KiB'>32359908</memory>
    <pages unit='KiB' size='4'>8038777</pages>
    <pages unit='KiB' size='2048'>100</pages>
    <pages unit='KiB' size='1048576'>0</pages>
    ...
  </cell>

  (8038777 * 4) + (100 * 2048) == 32359908

  [1] https://bugzilla.redhat.com/show_bug.cgi?id=1569678

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


Follow ups