From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] KVM: Allow host IRQ sharing for assigned PCI 2.3 devices Date: Tue, 10 Jan 2012 21:04:26 +0200 Message-ID: <20120110190425.GH17105@redhat.com> References: <4F0AF394.6000205@siemens.com> <20120110161748.GB17105@redhat.com> <4F0C758F.1060606@siemens.com> <20120110181014.GE17105@redhat.com> <4F0C818D.9@siemens.com> <20120110183143.GG17105@redhat.com> <4F0C86D8.3070007@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm , Alex Williamson , Jesse Barnes To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63477 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756686Ab2AJTCT (ORCPT ); Tue, 10 Jan 2012 14:02:19 -0500 Content-Disposition: inline In-Reply-To: <4F0C86D8.3070007@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jan 10, 2012 at 07:43:36PM +0100, Jan Kiszka wrote: > On 2012-01-10 19:31, Michael S. Tsirkin wrote: > > On Tue, Jan 10, 2012 at 07:21:01PM +0100, Jan Kiszka wrote: > >>> ATM writes to msi/msix mask bit have no effect for assigned > >>> devices. For virtio, they are implemented by deassigning irqfd > >>> which is a very slow operation (rcu write side). > >>> > >>> Instead, When guest writes to mask, qemu can set/clear by calling > >>> this ioctl. > >> > >> Isn't that effort better invested in proper in-kernel mask emulation for > >> MSI-X? > > > > This gives us a working implementation fo free. Whether MSIX mask > > writes are worth accelerating in kernel I'm not 100% sure. > > If it's worth optimizing the irqfd on/off dance, Not sure about that either. At least for virtio in my tests they almost never trigger. But it's needed for correctness for assigned devices for msix. > then it's more than > likely that eliminating the heavy user space exits, additional syscalls > along that way, and locking contentions up there is worth it as well. We > even have those mask ops in a time-critical paths here, unfortunately. > > > But IMO this > > shows it is a more generic interface. > > I'm worried about adding something new that will soon become obsolete > again. That's wasted effort IMHO unless we say today that there will be > no in-kernel MSI-X support. > > Jan Yes. But as we are adding a new interface maybe it's better to add a more generic one? I don't insist as I don't have a specific proposal, just something to consider. > -- > Siemens AG, Corporate Technology, CT T DE IT 1 > Corporate Competence Center Embedded Linux