From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [KVM PATCH v2 2/2] kvm: add support for irqfd via eventfd-notification interface Date: Mon, 27 Apr 2009 14:23:53 +0300 Message-ID: <49F595C9.3080907@redhat.com> References: <20090424042142.1796.60756.stgit@dev.haskins.net> <20090424042518.1796.65593.stgit@dev.haskins.net> <49F572EF.4010909@redhat.com> <49F58A8C.7090808@novell.com> <49F58FD6.907@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, davidel@xmailserver.org To: Gregory Haskins Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37144 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbZD0LYC (ORCPT ); Mon, 27 Apr 2009 07:24:02 -0400 In-Reply-To: <49F58FD6.907@novell.com> Sender: kvm-owner@vger.kernel.org List-ID: Gregory Haskins wrote: > Something else to consider: eventfd supports calling eventfd_signal() > from interrupt context, so > even if the callback were not invoked from a preempt/irq off CS due to > the wqh->lock, the context may still be a CS anyway. Now, userspace and > vbus based injection do not need to worry about this, but I wonder if > this is a desirable attribute for some other source (device-assignment > perhaps)? > I'm no networking expert, but device assignment certainly wants to queue an interrupt from an interrupt (basically it forwards the interrupt from host to guest). Block is also simple enough to trigger the interrupt from the completion context. For networking, we'd eventually want to do the host->guest copy using a dma engine, and we'd want to inject the interrupt from the dma engine's completion handler. > If so, is there a way to design the lockless-injection code such that > its still friendly to irq-context, or is this a mode that we would never > want to support anyway? I think this would be a good thing to have at > least to maintain compatibility with the existing eventfd interface, > which has its own advantages. > This has RCU painted all over it in a 1200-point font. -- error compiling committee.c: too many arguments to function