qemu-devel
[Top][All Lists]
Advanced

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

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


From: Igor Lvovsky
Subject: [Qemu-devel] CPU consumption for SMP windows guests.
Date: Tue, 14 Aug 2007 04:38:59 -0700

  Hi,

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.

 

     Regards,

                        Igor Lvovsky

Attachment: bios.bin
Description: bios.bin

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


reply via email to

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