From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [RFC 0/4] KVM in-kernel PM Timer implementation Date: Tue, 14 Dec 2010 15:52:26 +0200 Message-ID: <20101214135226.GJ15610@redhat.com> References: <901746004.680841292328577685.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4D077258.9030500@redhat.com> <1292334036.9367.88.camel@mothafucka.localdomain> <4D0775F1.7000201@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Glauber Costa , Ulrich Obergfell , kvm@vger.kernel.org, zamsden@redhat.com, mtosatti@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5580 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014Ab0LNNw2 (ORCPT ); Tue, 14 Dec 2010 08:52:28 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBEDqS1H010650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Dec 2010 08:52:28 -0500 Content-Disposition: inline In-Reply-To: <4D0775F1.7000201@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 14, 2010 at 03:49:37PM +0200, Avi Kivity wrote: > On 12/14/2010 03:40 PM, Glauber Costa wrote: > >> > >> What is the motivation for this? Are there any important guests that > >> use the pmtimer? > >Avi, > > > >All older RHEL and Windows, for example, would benefit for this. > > They only benefit from it because we don't provide HPET. If we did, > the guests would use HPET in preference to pmtimer, since HPET is so > much better than pmtimer (yet still sucks in an absolute sense). > > >> If anything I'd expect hpet or the Microsoft synthetic timers to be a > >> lot more important. > > > >True. But also a lot more work. > >Implementing just the pm timer counter - not the whole of it - in > >kernel, gives us a lot of gain with not very much effort. Patch is > >pretty simple, as you can see, and most of it is even code to turn it > >on/off, etc. > > > > Partial emulation is not something I like since it causes a fuzzy > kernel/user boundary. In this case, transitioning to userspace when > interrupts are enabled doesn't look so hot. Are you sure all guests > that benefit from this don't enable the pmtimer interrupt? What > about the transition? Will we have a time discontinuity when that > happens? > > What I'd really like to see is this stuff implemented in bytecode, > unfortunately that's a lot of work which will be very hard to > upstream. > Just use ACPI bytecode. It is upstream already. -- Gleb.