]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: Report supported huge pages
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Jul 2018 12:12:09 +0000 (14:12 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jul 2018 12:15:22 +0000 (14:15 +0200)
There are two places where we report supported sizes of huge pages:

  /capabilities/host/cpu/pages
  /capabilities/host/topology/cells/cell/pages

The former aggregates sizes over all NUMA nodes while the latter
reports supported sizes only for given node. While we are
reporting per NUMA node sizes we are not reporting the aggregated
sizes. I've noticed this when wondering why doesn't allocpages
completer work.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/lxc/lxc_conf.c

index 5cd6f231dd49e7b852f9a970d928722222ced1e0..949bfe246a4c592eec297cda553ce72e117ff4c3 100644 (file)
@@ -86,6 +86,10 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
     if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
         VIR_WARN("Failed to get host power management capabilities");
 
+    /* Add huge pages info */
+    if (virCapabilitiesInitPages(caps) < 0)
+        VIR_WARN("Failed to get pages info");
+
     if (virGetHostUUID(caps->host.host_uuid)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        "%s", _("cannot get the host uuid"));