Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966711AbbLPR4w (ORCPT ); Wed, 16 Dec 2015 12:56:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39015 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933672AbbLPR4u (ORCPT ); Wed, 16 Dec 2015 12:56:50 -0500 Subject: Re: [PATCH 0/5] Threaded MSI interrupt for VFIO PCI device To: Yunhong Jiang , alex.williamson@redhat.com References: <1449166972-8894-1-git-send-email-yunhong.jiang@linux.intel.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Paolo Bonzini Message-ID: <5671A5DD.5060708@redhat.com> Date: Wed, 16 Dec 2015 18:56:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1449166972-8894-1-git-send-email-yunhong.jiang@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1932 Lines: 44 Alex, can you take a look at the extension to the irq bypass interface in patch 2? I'm not sure I understand what is the case where you have multiple consumers for the same token. Paolo On 03/12/2015 19:22, Yunhong Jiang wrote: > When assigning a VFIO device to a KVM guest with low latency requirement, it > is better to handle the interrupt in the hard interrupt context, to reduce > the context switch to/from the IRQ thread. > > Based on discussion on https://lkml.org/lkml/2015/10/26/764, the VFIO msi > interrupt is changed to use request_threaded_irq(). The primary interrupt > handler tries to set the guest interrupt atomically. If it fails to achieve > it, a threaded interrupt handler will be invoked. > > The irq_bypass manager is extended for this purpose. The KVM eventfd will > provide a irqbypass consumer to handle the interrupt at hard interrupt > context. The producer will invoke the consumer's handler then. > > Yunhong Jiang (5): > Extract the irqfd_wakeup_pollin/irqfd_wakeup_pollup > Support runtime irq_bypass consumer > Support threaded interrupt handling on VFIO > Add the irq handling consumer > Expose x86 kvm_arch_set_irq_inatomic() > > arch/x86/kvm/Kconfig | 1 + > drivers/vfio/pci/vfio_pci_intrs.c | 39 ++++++++++-- > include/linux/irqbypass.h | 8 +++ > include/linux/kvm_host.h | 19 +++++- > include/linux/kvm_irqfd.h | 1 + > virt/kvm/Kconfig | 3 + > virt/kvm/eventfd.c | 131 ++++++++++++++++++++++++++------------ > virt/lib/irqbypass.c | 82 ++++++++++++++++++------ > 8 files changed, 214 insertions(+), 70 deletions(-) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/