From: Avi Kivity Subject: Re: [KVM PATCH v4 2/2] kvm: add support for irqfd via eventfd-notification interface Date: Thu, 07 May 2009 18:47:19 +0300 Message-ID: <4A030287.8010104@redhat.com> References: <20090504175657.26758.12503.stgit@dev.haskins.net> <20090504175750.26758.7023.stgit@dev.haskins.net> <4A0175F0.1090705@novell.com> <4A01AEC1.8020201@novell.com> <4A02AE65.3000800@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gregory Haskins , viro@ZenIV.linux.org.uk, kvm@vger.kernel.org, Linux Kernel Mailing List To: Davide Libenzi Return-path: Received: from mx2.redhat.com ([66.187.237.31]:49653 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755972AbZEGPrW (ORCPT ); Thu, 7 May 2009 11:47:22 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Davide Libenzi wrote: > >> What's your take on adding irq context safe callbacks to irqfd? >> >> To give some background here, we would like to use eventfd as a generic >> connector between components, so the components do not know about each other. >> So far eventfd successfully abstracts among components in the same process, in >> different processes, and in the kernel. >> >> eventfd_signal() can be safely called from irq context, and will wake up a >> waiting task. But in some cases, if the consumer is in the kernel, it may be >> able to consume the event from irq context, saving a context switch. >> >> So, will you consider patches adding this capability to eventfd? >> > > Maybe I got lost in the thread, but inside the kernel we have > callback-based wakeup since long time. This is what epoll uses, when > hooking into the file* f_op->poll() subsystem. > Did you mean something else? > Do you mean wait_queue_t::func? -- error compiling committee.c: too many arguments to function