From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool Date: Tue, 09 Dec 2008 10:01:34 -0600 Message-ID: <493E965E.5050701@us.ibm.com> References: <1228512061-25398-1-git-send-email-aliguori@us.ibm.com> <493E941D.4000608@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm-devel To: Gerd Hoffmann Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:57378 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752343AbYLIQBo (ORCPT ); Tue, 9 Dec 2008 11:01:44 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e1.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id mB9G15SJ022657 for ; Tue, 9 Dec 2008 11:01:05 -0500 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mB9G1aHu2289734 for ; Tue, 9 Dec 2008 11:01:36 -0500 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mB9G1ZCD026039 for ; Tue, 9 Dec 2008 09:01:35 -0700 In-Reply-To: <493E941D.4000608@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Gerd Hoffmann wrote: > Hi, > > >> 2) it's impossible to add new interfaces and we need a vectored read/write >> operation to properly support a zero-copy API. >> > > I'm eager to try vectored block ops for the xenbus block backend. > > >> It performs at least as well as the current posix-aio code (in some >> circumstances, even better). >> > > Well, I see a massive slowdown when switching from sync to aio in the > xen backend code. I think the reason is that due to the lack of a > vectored interface (and thus /me submitting separate aio requests for > each iovec element) stuff gets parallelized *way* too much and disk seek > times are killing me. > Yup. And I'm also adding vectored IO operations. Patches for that should show up in the next day or so. We experienced the same problem with virtio-blk FWIW. >> My only concern here is non-Linux Unices like FreeBSD. They have kernel support >> for posix-aio. Since we cannot extend those interfaces though, I think that >> even on those platforms we should still use a thread pool. >> > > Which might change some day in the future when we manage to get iovec > support into posix-aio specs. > > I think the interface should use qemu-prefixed function and struct > names. The we can trivially map them to a system-provided aio > implementation without worrying about name clashes. > Yes, that's what I'm going to do before committing it. Regards, Anthony Liguori > cheers, > Gerd >