[Top][All Lists]

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

[Qemu-devel] FW: [kvm-devel] CPU consumption for SMP windows guests.

From: Igor Lvovsky
Subject: [Qemu-devel] FW: [kvm-devel] CPU consumption for SMP windows guests.
Date: Sun, 26 Aug 2007 02:10:01 -0700

>> Does anybody know what's going on? Is SMP support working at the moment?


>SMP works fine on Sparc32. Performance isn't great because the CPUs are not halted in SMP mode but they busy loop when idle.



I sent this patch before, but probably it was dropped.

I hope it will help.



 Igor Lvovsky


From: address@hidden [mailto:address@hidden On Behalf Of Igor Lvovsky
Sent: Tuesday, August 14, 2007 2:39 PM
To: address@hidden; address@hidden; address@hidden
Subject: [kvm-devel] CPU consumption for SMP windows guests.



I tried to play recently with the ACPI to solve the "CPU consumption for SMP windows guests" problem that was discussed in kvm forum.


The current problem is:

The windows UP guest with latest Bochs bios work well - with reasonable CPU usage.

The windows SMP guest with same bios, consumes a lot of CPU.


As it was mentioned in forum (by Avi) it looks like the problem in the windows Idle loop, that spinning instead of executing a 'hlt' instruction.

So, the solution lies in ACPI area.  We need to modify a little bit ACPI tables as following:

  1. We need expose the CPUs via DSDT table (After this patch we can support up to 16 CPUs)

- It's immediately solving the problem with the SMP guests. Now, with new bios windows run with reasonable CPU consuming.


Notes: The UP guest uses the HAL with the halaacpi.dll and windows Idle loop work fine without ACPI support (I mean bios don't expose the CPU as ACPI device).

But, the SMP guest uses HAL with the halmacpi.dll and it looks like windows can't work properly without ACPI support.

In additional, once you run the image as SMP (the windows will update the HAL dll) you can't run it again as UP (truly you can, but the CPU consuming will huge).  

The reason for this behavior looks like windows bug; windows can't revert the HAL to the proper dll for UP.

So, the next case fixes this new UP problem and allows running UP guests with SMP/UP HAL with good CPU consumption.


  1. We need to disable support of C2 and C3 CPU states via FADT (P_LVL2_LAT and P_LVL3_LAT fields).


I attached the patch for BOCHS bios and compiled bios.bin.



                        Igor Lvovsky

Attachment: bios.bin
Description: bios.bin

Attachment: cpu-consumption.diff
Description: cpu-consumption.diff

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Attachment: ATT3932872.txt
Description: ATT3932872.txt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]