From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8II-0004GP-Rw for qemu-devel@nongnu.org; Tue, 18 Oct 2011 07:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG8I9-0003UF-VH for qemu-devel@nongnu.org; Tue, 18 Oct 2011 07:57:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8I9-0003U3-Mj for qemu-devel@nongnu.org; Tue, 18 Oct 2011 07:57:09 -0400 Date: Tue, 18 Oct 2011 13:58:13 +0200 From: "Michael S. Tsirkin" Message-ID: <20111018115813.GF28776@redhat.com> References: <20111017154852.GC7876@redhat.com> <4E9C81CC.5040900@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E9C81CC.5040900@web.de> Subject: Re: [Qemu-devel] [RFC][PATCH 28/45] qemu-kvm: msix: Drop tracking of used vectors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On Mon, Oct 17, 2011 at 09:28:12PM +0200, Jan Kiszka wrote: > On 2011-10-17 17:48, Michael S. Tsirkin wrote: > > On Mon, Oct 17, 2011 at 11:28:02AM +0200, Jan Kiszka wrote: > >> This optimization was only required to keep KVM route usage low. Now > >> that we solve that problem via lazy updates, we can drop the field. We > >> still need interfaces to clear pending vectors, though (and we have to > >> make use of them more broadly - but that's unrelated to this patch). > >> > >> Signed-off-by: Jan Kiszka > > > > Lazy updates should be an implementation detail. > > IMO resource tracking of vectors makes sense > > as an API. Making devices deal with pending > > vectors as a concept, IMO, does not. > > There is really no use for tracking the vector lifecycle once we have > lazy updates (except for static routes). It's a way too invasive > concept, and it's not needed for anything but KVM. I think it's needed. The PCI spec states that when the device does not need an interrupt anymore, it should clear the pending bit. The use/unuse is IMO a decent API for this, because it uses a familiar resource tracking concept. Exposing this knowledge of msix to devices seems like a worse API. > > If you want an example, check > http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/70915 and > compare it to the changes done to hpet in this series. > > Jan > This seems to be a general argument that lazy updates are good? I have no real problem with them, besides the fact that we need an API to reserve space in the routing table so that device setup can fail upfront. -- MST