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: Wed, 10 Dec 2008 20:08:10 +0100 Message-ID: <20081210190810.GG18814@random.random> References: <1228512061-25398-1-git-send-email-aliguori@us.ibm.com> <493E941D.4000608@redhat.com> <493E965E.5050701@us.ibm.com> <20081210164401.GF18814@random.random> <493FFAB6.2000106@codemonkey.ws> <493FFC8E.9080802@redhat.com> <49400F69.8080707@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gerd Hoffmann , qemu-devel@nongnu.org, kvm-devel To: Anthony Liguori Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47250 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbYLJTIQ (ORCPT ); Wed, 10 Dec 2008 14:08:16 -0500 Content-Disposition: inline In-Reply-To: <49400F69.8080707@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Dec 10, 2008 at 12:50:17PM -0600, Anthony Liguori wrote: > But opening twice means that you lose coherency with NFS. Not sure why. They're not running from different nfs clients. If this really isn't feasible, other ways to go would be to stick with a single thread and add kernel aio to fix seeking I/O bandwidth (so cfq indexing the bucket by the thread id will also work ok). Alternatively we can support readv/writev only with kernel aio, no threads, and we emulate it with a flood of pread/pwrite on the other host os plus we set DEBUG_BOUNCE where readv/writev is emulated. But then linux will be the only host OS benefiting from zerocopy. If we never want to add kernel aio, we can also add preadv/pwritev to linux but it remains a linux-only solution, so going with kernel aio for a linux-only solution is surely better than the workaround with userland threads plus preadv/pwritev. Still Al or somebody should add preadv/pwritev, those are needed and useful as shown here.