From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdlZp-0002mn-5w for qemu-devel@nongnu.org; Thu, 11 Sep 2008 08:47:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdlZo-0002lg-89 for qemu-devel@nongnu.org; Thu, 11 Sep 2008 08:47:12 -0400 Received: from [199.232.76.173] (port=42432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdlZm-0002lD-Vu for qemu-devel@nongnu.org; Thu, 11 Sep 2008 08:47:11 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:55177) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KdlZi-0004I6-Qj for qemu-devel@nongnu.org; Thu, 11 Sep 2008 08:47:10 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e34.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m8BCkxgE023923 for ; Thu, 11 Sep 2008 08:46:59 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m8BCkwRk220350 for ; Thu, 11 Sep 2008 06:46:58 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m8BIkwPu019354 for ; Thu, 11 Sep 2008 12:46:58 -0600 Message-ID: <48C91302.70207@us.ibm.com> Date: Thu, 11 Sep 2008 07:45:54 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1221061788-26166-1-git-send-email-aliguori@us.ibm.com> <48C8CD4E.1020705@redhat.com> In-Reply-To: <48C8CD4E.1020705@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH][RFC] Refactor AIO to allow multiple AIO implementations Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Ryan Harper , qemu-devel@nongnu.org, kvm@vger.kernel.org Gerd Hoffmann wrote: > Anthony Liguori wrote: > >> This patch refactors the AIO layer to allow multiple AIO implementations. It's >> only possible because of the recent signalfd() patch. >> >> Right now, the AIO infrastructure is pretty specific to the block raw backend. >> For other block devices to implement AIO, the qemu_aio_wait function must support >> registration. This patch introduces a new function, qmeu_aio_set_fd_handler, which >> can be used to register a file descriptor to be called back. qemu_aio_wait() now >> polls a set of file descriptors registered with this function until one becomes >> readable or writable. >> > > Hmm, what is the long-term plan for this? Step one is to move the generic aio bits out of block-raw-posix (which this patch does). Step two is to move the posix-aio routines out of block-raw-posix. Step three would be to add a generic interface to allow block-raw-posix to use multiple aio implementations Step four would be to add a new aio implementation (I think the best route is a thread-pool based implementation). Regards, Anthony Liguori > Separating out the completion > notification is a nice first step. Most of the aio infrastructure is > still in the block raw backend though. IMHO it doesn't belong there. > > The aio implementation(s) should be a separate entity usable by all > block backends to invoke aio requests, without having to care about how > this is actually implemented (threads, linux aio, posix aio, whatever). > > cheers, > Gerd > >