From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 3/3] KVM: PIT: fix injection logic and count Date: Tue, 29 Jul 2008 11:42:57 -0300 Message-ID: <20080729144257.GC26984@dmt.cnet> References: <20080726200058.559700262@localhost.localdomain> <20080726200349.277527367@localhost.localdomain> <488F133E.7010702@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sheng Yang , kvm To: Avi Kivity Return-path: Received: from mx1.redhat.com ([66.187.233.31]:48412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754716AbYG2Onf (ORCPT ); Tue, 29 Jul 2008 10:43:35 -0400 Content-Disposition: inline In-Reply-To: <488F133E.7010702@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jul 29, 2008 at 03:55:26PM +0300, Avi Kivity wrote: > Sometimes the guest leaves the timer enabled but the output pin masked, > (e.g. it doesn't use the timer bug doesn't bother to turn it off > properly). This results in extraneous interrupts, causing unnecessary > vmexits and increased power usage. > > But if we detect that the guest isn't processing the interrupts, we can > turn the timer off, and after the next injection, calculate the number > of missing interrupts, and turn the timer on again. This will have to > be done carefully (taking care of the guest adjusting the frequency > during the period where we missed injections, for example). Sounds like a good idea, I'll try something later. > > Comments? Questions? Patches?