Re: [libvirt] freecell gives out bytes instead of kilobytes

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

 



On Fri, Apr 03, 2009 at 11:23:59AM +0100, Daniel P. Berrange wrote:
> On Fri, Apr 03, 2009 at 12:04:05AM +0200, Gerrit Slomma wrote:
> > The virsh-command freecell hands out bytes but affixes those with kB.
> > The error ist found in virsh.c on line 1663 and following.
> > I have corrected this and altered the output to the method i chose for 
> > virt-manager - in the days of 96 GB per socket (Nehalem-EP) no one cares 
> > even about a fraction of a Megabyte.
> 
> For command line tools like virsh I prefer to have it consistently 
> report in the same units, so if someone wants to script it from
> the shell they don't have to concern themselves with changing units.
> 
> All the other virsh commands report in KB, so the simple fix is to
> just divide by 1024.

  Agreed, let's not make it too hard for tools who would parse virsh
output, even though we should not encourage that practice :-)

> In checking this I discovered a whole bunch of other fun bugs in the
> NUMA support :-)  The QEMU impl was not returning the correct return
> code - it used -1 instead of 0. The QEMU impl was also not setting an
> error if the requested cell was out of range. The libvirtd remote
> driver was not correctly seeing return value of -1 due to casting it
> to an unsigned int. virsh was not checking return values correctly
> either.

  Heh !

> So I propose the following patch....

  ACK, fine by me !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]