From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH][RFC] Linux AIO support when using O_DIRECT Date: Mon, 23 Mar 2009 18:17:36 +0200 Message-ID: <49C7B620.8030203@redhat.com> References: <1237823124-6417-1-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44922 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758628AbZCWQRn (ORCPT ); Mon, 23 Mar 2009 12:17:43 -0400 In-Reply-To: <1237823124-6417-1-git-send-email-aliguori@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > This is just a first cut. It needs a fair bit of cleanup before it can be > committed. I also think we need to fixup the AIO abstractions a bit. > > I wanted to share though in case anyone is interested in doing some performance > comparisons. It seems to work although I haven't exercised it very much. > > > +typedef struct AIOOperations > +{ > + struct qemu_aiocb *(*get_aiocb)(void); > + void (*put_aiocb)(struct qemu_aiocb *); > + int (*read)(struct qemu_aiocb *); > + int (*write)(struct qemu_aiocb *); > + int (*error)(struct qemu_aiocb *); > + ssize_t (*get_result)(struct qemu_aiocb *aiocb); > + int (*cancel)(int fd, struct qemu_aiocb *aiocb); > +} AIOOperations; > + > Instead of introducing yet another layer of indirection, you could add block-raw-linux-aio, which would be registered before block-raw-posix (which is realy block-raw-threadpool...), and resist a ->probe() if caching is enabled. -- error compiling committee.c: too many arguments to function