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

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

 



2009/11/15 Daniel Veillard <veillard@xxxxxxxxxx>:
> 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 !

Yes, it was found while running some stress tests with our system.
Some tests failed because the CPU clock value reported by the ESX
driver was to small due to the 1024 VS 1000 problem.

Matthias

>  ACK
>
> Daniel
>

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