From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAUPx-0008Nk-PJ for qemu-devel@nongnu.org; Wed, 10 Dec 2008 14:08:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAUPw-0008Lz-BY for qemu-devel@nongnu.org; Wed, 10 Dec 2008 14:08:17 -0500 Received: from [199.232.76.173] (port=59849 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAUPw-0008Lr-8T for qemu-devel@nongnu.org; Wed, 10 Dec 2008 14:08:16 -0500 Received: from mx2.redhat.com ([66.187.237.31]:36914) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAUPv-0002RO-JJ for qemu-devel@nongnu.org; Wed, 10 Dec 2008 14:08:15 -0500 Date: Wed, 10 Dec 2008 20:08:10 +0100 From: Andrea Arcangeli Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool 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 Content-Disposition: inline In-Reply-To: <49400F69.8080707@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Gerd Hoffmann , kvm-devel , qemu-devel@nongnu.org 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.