From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH][RFC] Use return value from kvm_set_irq() to re-inject PIT interrupts. Date: Wed, 26 Aug 2009 16:48:14 +0300 Message-ID: <4A953D1E.4020007@redhat.com> References: <20090824120623.GC30093@redhat.com> <20090824163256.GA8653@amt.cnet> <20090824171646.GA11762@redhat.com> <20090824174427.GA10311@amt.cnet> <20090824181905.GB11762@redhat.com> <20090826124348.GA32235@amt.cnet> <20090826131917.GE30093@redhat.com> <20090826133842.GB676@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org, zamsden@redhat.com To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2310 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757352AbZHZNsO (ORCPT ); Wed, 26 Aug 2009 09:48:14 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7QDmGvs026332 for ; Wed, 26 Aug 2009 09:48:16 -0400 In-Reply-To: <20090826133842.GB676@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 08/26/2009 04:38 PM, Marcelo Tosatti wrote: > > An injectable timer interrupt is defined by: > > - time(now)>= time(next_expiration) > - Previous timer interrupt has been acked (thus we can inject). > > The thing is, sure you can drop ack notifiers and check IRR > on every guest entry, but why bother if you can receive an > asynchronous notification? > > Would you prefer to replace > > + if (!ktimer->can_inject) > > With > kvm_set_irq() > > ? > > Not relatively cheap. > Well, we expect it to be a rare condition that we have pending timer interrupts, so if it leads to significant code simplification, it can be worthwhile. -- error compiling committee.c: too many arguments to function