From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: [PATCH 0/6] In kernel PIT patch Date: Thu, 06 Mar 2008 00:40:23 +0200 Message-ID: <1204756823.4708.17.camel@localhost.localdomain> References: <200803041822.40285.sheng.yang@intel.com> <47CD7038.6000200@codemonkey.ws> <1204672734.25172.24.camel@localhost.localdomain> <47CDEE50.3060206@codemonkey.ws> <1204712042.31109.23.camel@localhost.localdomain> <47CEB519.6080305@codemonkey.ws> <47CED8AD.80201@qumranet.com> Reply-To: dor.laor@qumranet.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Avi Kivity Return-path: In-Reply-To: <47CED8AD.80201@qumranet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Wed, 2008-03-05 at 19:30 +0200, Avi Kivity wrote: > Anthony Liguori wrote: > > Playing a movie is a bit subjective. I presume you're talking about the > > standard HAL as presumably the ACPI HAL is using the pm timer? > > > > ACPI HAL uses the apic timer, IIRC; perhaps the pm timer as well. > > > So the two cases I'm hearing where timer accuracy should improve is > > standard HAL on Windows and clock=pit on Linux? I'd still like to see > > what the actual difference in timer accuracy is. > > It depends on the load. As the load increases, the host process starts > to miss timer signals. With both pic and pit in userspace, you can > detect those missed interrupts and inject them later once you get your > timeslice. With the pic in kernel, there is no way to do this. > > The same thing happens with the apic timer, only there, it is easy to > compensate because both parts are in the kernel. > > > I have no doubt that > > moving the pit into the kernel is more efficient. Moving everything > > into the kernel is more efficient because light weight exits are cheaper > > than heavy weight exits. > > > > Efficiency is only a secondary goal here. The userspace PIT does not > consume large amounts of CPU. > > > The thing I'm trying to get at is a quantitative statement about why > > moving the pit into the kernel is the right thing. I'll try to give the > > patches a try myself in the next couple of days. I don't think it's > > obvious that it's the right thing to do without some sort of benchmark > > supporting it. > > > > Playing a movie is better than any benchmark; it reflects actual user > experience in a real and important use case. Benchmarks are substitutes > for real use cases, not the goal of the optimization. > I forgot to mention that the benchmark is measuring time drift in the guest. Playing a movie in winxp changes the guest clock frequency from 100HZ to 1000HZ, thus causing a 250HZ host to coalesce pit irqs. So good pic & pit combination can handle guest multimedia without drifts while insufficient implementation just can't. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/