From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool Date: Thu, 11 Dec 2008 19:11:16 +0100 Message-ID: <20081211181116.GE6809@random.random> References: <493FFAB6.2000106@codemonkey.ws> <493FFC8E.9080802@redhat.com> <49400F69.8080707@codemonkey.ws> <20081210190810.GG18814@random.random> <20081211131222.GA14908@random.random> <494130B5.2080800@redhat.com> <20081211155335.GE14908@random.random> <49413B9C.3030703@redhat.com> <20081211164947.GD6809@random.random> <49414BC9.5090905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , kvm-devel , qemu-devel@nongnu.org To: Gerd Hoffmann Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38179 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755700AbYLKSLX (ORCPT ); Thu, 11 Dec 2008 13:11:23 -0500 Content-Disposition: inline In-Reply-To: <49414BC9.5090905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Dec 11, 2008 at 06:20:09PM +0100, Gerd Hoffmann wrote: > Andrea Arcangeli wrote: > > On Thu, Dec 11, 2008 at 05:11:08PM +0100, Gerd Hoffmann wrote: > >> Yes. But kernel aio requires O_DIRECT, so aio users are affected > >> nevertheless. > > > > Are you sure? It surely wasn't the case... > > Tons of docs say so, but might be they are wrong, I didn't check. I guess those tons of docs are just wrong then ;). I see no mention of O_DIRECT in `man io_submit` at least... I seem to recall initially aio only worked without O_DIRECT... ;). It's quite the opposite, O_DIRECT works best with kernel aio, not the other way around. O_DIRECT read/writes look very much like non-O_DIRECT seeking reads. For seeking sync-reads kernel aio pays off as well as with O_DIRECT. > So one could be preadv+threads. Probably quite portable if we manage to > get the syscalls into linux kernel and glibc. All *BSDs have it > already, for solaris I've found a feature request on that. Dunno for MacOS. Who's taking care of submitting it to linux? From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAq0R-0006ph-TX for qemu-devel@nongnu.org; Thu, 11 Dec 2008 13:11:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAq0R-0006nt-0Q for qemu-devel@nongnu.org; Thu, 11 Dec 2008 13:11:23 -0500 Received: from [199.232.76.173] (port=43148 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAq0Q-0006nd-TO for qemu-devel@nongnu.org; Thu, 11 Dec 2008 13:11:22 -0500 Received: from mx2.redhat.com ([66.187.237.31]:59514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAq0Q-0002ns-Hg for qemu-devel@nongnu.org; Thu, 11 Dec 2008 13:11:22 -0500 Date: Thu, 11 Dec 2008 19:11:16 +0100 From: Andrea Arcangeli Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool Message-ID: <20081211181116.GE6809@random.random> References: <493FFAB6.2000106@codemonkey.ws> <493FFC8E.9080802@redhat.com> <49400F69.8080707@codemonkey.ws> <20081210190810.GG18814@random.random> <20081211131222.GA14908@random.random> <494130B5.2080800@redhat.com> <20081211155335.GE14908@random.random> <49413B9C.3030703@redhat.com> <20081211164947.GD6809@random.random> <49414BC9.5090905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49414BC9.5090905@redhat.com> 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: kvm-devel , qemu-devel@nongnu.org On Thu, Dec 11, 2008 at 06:20:09PM +0100, Gerd Hoffmann wrote: > Andrea Arcangeli wrote: > > On Thu, Dec 11, 2008 at 05:11:08PM +0100, Gerd Hoffmann wrote: > >> Yes. But kernel aio requires O_DIRECT, so aio users are affected > >> nevertheless. > > > > Are you sure? It surely wasn't the case... > > Tons of docs say so, but might be they are wrong, I didn't check. I guess those tons of docs are just wrong then ;). I see no mention of O_DIRECT in `man io_submit` at least... I seem to recall initially aio only worked without O_DIRECT... ;). It's quite the opposite, O_DIRECT works best with kernel aio, not the other way around. O_DIRECT read/writes look very much like non-O_DIRECT seeking reads. For seeking sync-reads kernel aio pays off as well as with O_DIRECT. > So one could be preadv+threads. Probably quite portable if we manage to > get the syscalls into linux kernel and glibc. All *BSDs have it > already, for solaris I've found a feature request on that. Dunno for MacOS. Who's taking care of submitting it to linux?