[libvirt] [PATCH] esx: Fix CPU clock Hz to MHz conversion
Daniel Veillard
veillard at redhat.com
Sun Nov 15 08:56:40 UTC 2009
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 at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list