From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v3 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Date: Wed, 3 Nov 2010 11:10:45 +0200 Message-ID: <20101103091045.GH6772@redhat.com> References: <628f014fb1efb8e2208db03d13198ba301a3a34c.1288771873.git.jan.kiszka@web.de> <20101103082921.GD6772@redhat.com> <4CD123B8.8080607@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm , Alex Williamson , Jan Kiszka To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63805 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685Ab0KCJKs (ORCPT ); Wed, 3 Nov 2010 05:10:48 -0400 Content-Disposition: inline In-Reply-To: <4CD123B8.8080607@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 03, 2010 at 09:56:24AM +0100, Jan Kiszka wrote: > > Hmm, this does an extra config read on each interrupt (another one is in > > pci_2_3_irq_unmask). These reads are pretty expensive... I do realize > > locking becomes ugly, though. Maybe my idea to avoid set level to 0 > > was silly? Thoughts? > > Well, reading twice is the price to pay here, putting kvm_set_irq under > spin_lock_irq again is a no-go. From that POV, the previous version was > probably the cheapest: no extra efforts in the common case, but still > avoiding reassertion via the host IRQ handler whenever possible. > > Jan > Sigh. I guess so. Any chance of a benchmark to let us figure this out? -- MST