Re: [libvirt] [PATCH] esx: Fix CPU clock Hz to MHz conversion

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

 



On Sat, Nov 14, 2009 at 11:02:48PM +0100, Matthias Bolte wrote:
> ---
>  src/esx/esx_driver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index b84250c..5737fe9 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -878,7 +878,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
>  
>      nodeinfo->memory = memorySize / 1024; /* Scale from bytes to kilobytes */
>      nodeinfo->cpus = cpuInfo_numCpuCores;
> -    nodeinfo->mhz = cpuInfo_hz / (1024 * 1024); /* Scale from hz to mhz */
> +    nodeinfo->mhz = cpuInfo_hz / (1000 * 1000); /* Scale from hz to mhz */
>      nodeinfo->nodes = numaInfo_numNodes;
>      nodeinfo->sockets = cpuInfo_numCpuPackages;
>      nodeinfo->cores = cpuInfo_numCpuPackages > 0

  Ahhh :-) subtle !

  ACK

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]