* [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller
@ 2008-01-11 21:26 Marcelo Tosatti
2008-01-13 10:25 ` Avi Kivity
2008-01-13 11:19 ` Anders
0 siblings, 2 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2008-01-11 21:26 UTC (permalink / raw)
To: kvm-devel; +Cc: qemu-devel-qX2TKyscuCcdnm+yROfE0A
The PIIX4 ACPI controller prior to revision 0x3 contains a bug where
reading of the timer port is unreliable, so the kernel reads it three
times for consistency check.
QEMU does not suffer from that problem :)
The datasheet for PIIX4, PIIX4E, and PIIX4M is the same. I failed to
find any indication that the revision increase could affect anything
other than the PMTimer port read.
This reduces idle guest CPU consumption from 14% to 8% on 4-way KVM
guest.
--- kvm-userspace.orig/qemu/hw/acpi.c
+++ kvm-userspace/qemu/hw/acpi.c
@@ -486,7 +486,7 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int
pci_conf[0x03] = 0x71;
pci_conf[0x06] = 0x80;
pci_conf[0x07] = 0x02;
- pci_conf[0x08] = 0x00; // revision number
+ pci_conf[0x08] = 0x03; // revision number
pci_conf[0x09] = 0x00;
pci_conf[0x0a] = 0x80; // other bridge device
pci_conf[0x0b] = 0x06; // bridge device
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller 2008-01-11 21:26 [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller Marcelo Tosatti @ 2008-01-13 10:25 ` Avi Kivity 2008-01-13 11:19 ` Anders 1 sibling, 0 replies; 6+ messages in thread From: Avi Kivity @ 2008-01-13 10:25 UTC (permalink / raw) To: Marcelo Tosatti; +Cc: kvm-devel, qemu-devel-qX2TKyscuCcdnm+yROfE0A Marcelo Tosatti wrote: > The PIIX4 ACPI controller prior to revision 0x3 contains a bug where > reading of the timer port is unreliable, so the kernel reads it three > times for consistency check. > > QEMU does not suffer from that problem :) > > The datasheet for PIIX4, PIIX4E, and PIIX4M is the same. I failed to > find any indication that the revision increase could affect anything > other than the PMTimer port read. > > This reduces idle guest CPU consumption from 14% to 8% on 4-way KVM > guest. > > Applied (to kvm's qemu), thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller 2008-01-11 21:26 [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller Marcelo Tosatti 2008-01-13 10:25 ` Avi Kivity @ 2008-01-13 11:19 ` Anders [not found] ` <87ve5yynuv.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Anders @ 2008-01-13 11:19 UTC (permalink / raw) To: Marcelo Tosatti; +Cc: kvm-devel Marcelo Tosatti <marcelo-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org> writes: > This reduces idle guest CPU consumption from 14% to 8% on 4-way KVM > guest. How do you get that high consumption? What combination of clocks/hz on host/guest are you using? I am cursious, since my idle KVM process is at less than 1%. Regards, Anders. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <87ve5yynuv.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org>]
* Re: [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller [not found] ` <87ve5yynuv.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org> @ 2008-01-13 14:22 ` Marcelo Tosatti 2008-01-13 15:49 ` Anders 0 siblings, 1 reply; 6+ messages in thread From: Marcelo Tosatti @ 2008-01-13 14:22 UTC (permalink / raw) To: Anders; +Cc: Marcelo Tosatti, kvm-devel On Sun, Jan 13, 2008 at 12:19:20PM +0100, Anders wrote: > Marcelo Tosatti <marcelo-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org> writes: > > > This reduces idle guest CPU consumption from 14% to 8% on 4-way KVM > > guest. > > How do you get that high consumption? What combination of clocks/hz on > host/guest are you using? CONFIG_HZ=250 4-way SMP guest, 8-way Intel host (without the VMX TSC sync patch posted previously). > I am cursious, since my idle KVM process is at less than 1%. You have an UP guest right? The problem is that the TSC synchronization check on boot is only performed on SMP guests. Intel hosts usually have their TSC synchronized, whereas AMD ones don't, so they fall back to use the ACPI PM timer (until the HPET QEMU/KVM support is in place). UP guests use TSC as a clocksource by default, and TSC reads won't cause a VMExit. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller 2008-01-13 14:22 ` Marcelo Tosatti @ 2008-01-13 15:49 ` Anders [not found] ` <878x2tzpx4.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Anders @ 2008-01-13 15:49 UTC (permalink / raw) To: Marcelo Tosatti; +Cc: kvm-devel Marcelo Tosatti <marcelo-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org> writes: > On Sun, Jan 13, 2008 at 12:19:20PM +0100, Anders wrote: [...] >> How do you get that high consumption? What combination of clocks/hz on >> host/guest are you using? > > CONFIG_HZ=250 Okay, with nohz=off (in the guest) I also see some higher load. I didn't try the patch, though. > UP guests use TSC as a clocksource by default, and TSC reads won't > cause a VMExit. So for the lightest load (power saving), I should use UP and TSC? Thanks, Anders. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <878x2tzpx4.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org>]
* Re: [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller [not found] ` <878x2tzpx4.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org> @ 2008-01-14 13:24 ` Marcelo Tosatti 0 siblings, 0 replies; 6+ messages in thread From: Marcelo Tosatti @ 2008-01-14 13:24 UTC (permalink / raw) To: Anders; +Cc: Marcelo Tosatti, kvm-devel On Sun, Jan 13, 2008 at 04:49:27PM +0100, Anders wrote: > Marcelo Tosatti <marcelo-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org> writes: > > > On Sun, Jan 13, 2008 at 12:19:20PM +0100, Anders wrote: > > [...] > > >> How do you get that high consumption? What combination of clocks/hz on > >> host/guest are you using? > > > > CONFIG_HZ=250 > > Okay, with nohz=off (in the guest) I also see some higher load. I > didn't try the patch, though. > > > UP guests use TSC as a clocksource by default, and TSC reads won't > > cause a VMExit. > > So for the lightest load (power saving), I should use UP and TSC? Yes. As you note NOHZ also helps dramatically. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-14 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 21:26 [PATCH] report revision 3 of the ACPI/SMBus PIIX4 controller Marcelo Tosatti
2008-01-13 10:25 ` Avi Kivity
2008-01-13 11:19 ` Anders
[not found] ` <87ve5yynuv.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org>
2008-01-13 14:22 ` Marcelo Tosatti
2008-01-13 15:49 ` Anders
[not found] ` <878x2tzpx4.fsf-MhEMtRviUwpApvB0Y80ENH9LOBIZ5rWg@public.gmane.org>
2008-01-14 13:24 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox