Re: [PATCH] virsh: Teach cmdFreepages to work with lxc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/02/2015 04:30 AM, Michal Privoznik wrote:
> Some drivers don't expose available huge page sizes in the
> capabilities XML. For instance, LXC driver is one of those.
> This has a downside that when virsh is trying to get
> aggregated info on free pages per all NUMA nodes, it fails.
> The problem is that the virNodeGetFreePages() API expects
> caller to pass an array of page sizes he is interested in.
> In virsh, this array is filled from the capabilities from
> '/capabilities/host/cpu/pages' XPath. As said, in LXC
> there's no such XPath and therefore virsh fails currently.
> But hey, we can fallback: the page sizes are exposed under
> '/capabilities/host/topology/cells/cell/pages'. The page
> size can be collected from there, and voilà the command
> works again. But now we must make sure that there are no
> duplicates in the array passed to the public API. Otherwise
> we won't get as beautiful output as we are getting now.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  tools/virsh-host.c | 37 ++++++++++++++++++++++++++++++++++---
>  1 file changed, 34 insertions(+), 3 deletions(-)
> 

Seems reasonable...

ACK

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]