From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSwpk-0006oo-Dj for qemu-devel@nongnu.org; Tue, 12 Aug 2008 12:34:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSwpj-0006nq-KH for qemu-devel@nongnu.org; Tue, 12 Aug 2008 12:34:55 -0400 Received: from [199.232.76.173] (port=55133 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSwpj-0006nI-Dw for qemu-devel@nongnu.org; Tue, 12 Aug 2008 12:34:55 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:34198) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSwpg-0003YP-Cu for qemu-devel@nongnu.org; Tue, 12 Aug 2008 12:34:53 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e4.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m7CGYLeb000662 for ; Tue, 12 Aug 2008 12:34:21 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m7CGYLLh233066 for ; Tue, 12 Aug 2008 12:34:21 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m7CGYLUP016031 for ; Tue, 12 Aug 2008 12:34:21 -0400 Subject: Re: [Qemu-devel] [RFC][PATCH] Add HPET emulation to qemu (v2) From: Beth Kon In-Reply-To: <20080802172103.GH4535@implementation> References: <1217675114-17670-1-git-send-email-eak@us.ibm.com> <20080802113812.GD4535@implementation> <48947346.5080605@codemonkey.ws> <20080802172103.GH4535@implementation> Content-Type: text/plain; charset=UTF-8 Date: Tue, 12 Aug 2008 12:33:52 -0400 Message-Id: <1218558832.7401.13.camel@beth-ubuntu> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Sat, 2008-08-02 at 18:21 +0100, Samuel Thibault wrote: > Anthony Liguori, le Sat 02 Aug 2008 09:46:30 -0500, a =C3=A9crit : > > Samuel Thibault wrote: > > >Beth Kon, le Sat 02 Aug 2008 06:05:14 -0500, a =C3=A9crit : > > > =20 > > >>I was trying to reproduce the wakeup every 10ms that=20 > > >>Samuel Thibault mentioned, thinking the HPET would improve it.=20 > > >>But for an idle guest in both cases (with and without HPET), the=20 > > >>number of wakeups per second was relatively low (28). > > >> =20 > > > > > >I was referring to vl.c's timeout =3D 10; which makes the select cal= l > > >use a timeout of 10ms. That said, "/* If all cpus are halted then wa= it > > >until the next IRQ */", so maybe that's why you get slower wakeups p= er > > >second. I'm still surprised because of the call to qemu_mod_timer i= n > > >pit_irq_timer_update which should setup at least a 100Hz timer with > > >linux guests (when they don't have HPET available). > > > =20 > >=20 > > The patch disables that when hpet is active. >=20 > That's why I would expect, indeed, but he is reporting that _without_ > HPET he gets low wakeups per second already. >=20 > Samuel Yes, 28 is incorrect. I was misinterpreting the output of powertop, shown here: Wakeups-from-idle per second : 27.7 interval: 10.0s no ACPI power usage estimate available Top causes for wakeups: 46.1% ( 63.9) qemu-system-x86 : schedule_timeout (process_timeout) 36.5% ( 50.6) qemu-system-x86 : sys_timer_settime (posix_timer_fn) ... The "Wakeups-from-idle per second" reports 27.7, but the powertop source code shows that this value is the total wakeups-per-second divided by the number of online processors. So the proper number of wakeups-per-second caused by the select is 63.9, which makes more sense.=20 Looking at the main_loop code, there is no way to get a timeout of greater than 10 without setting icount.=20 > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --=20 Elizabeth Kon (Beth) IBM Linux Technology Center Open Hypervisor Team email: eak@us.ibm.com