From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: linux-aio usable? Date: Mon, 08 Mar 2010 23:11:06 +0300 Message-ID: <4B9559DA.8000407@msgid.tls.msk.ru> References: <4B94BF05.20609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Bernhard Schmidt , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from isrv.corpit.ru ([81.13.33.159]:48020 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755456Ab0CHULJ (ORCPT ); Mon, 8 Mar 2010 15:11:09 -0500 In-Reply-To: <4B94BF05.20609@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > On 03/08/2010 03:46 AM, Bernhard Schmidt wrote: >> Hi, >> >> sorry for this pretty generic question, I did not find any real pros and >> cons on the net anywhere, but I might just have missed them. >> >> In a pure x86_64 environment (~2.6.32 vanilla kernel, 0.12.3 qemu-kvm), >> is enabling linux-aio in KVM a good idea? > > Yes. Apparently that does not quite work. I just re-compiled kvm with --enable-linux-aio (actually I just installed libaio-dev on debian and qemu-kvm's configure picked it up automatically), and tried a guest. But any I/O fails. kvm-0.12.3 ... -drive file=/dev/sda10,if=virtio,cache=none,aio=native (/dev/sda10 is a (spare) partition on my hard drive I use for testing). Here's the resulting dmesg in the guest (2.6.32): vdb: end_request: I/O error, dev vdb, sector 0 Buffer I/O error on device vdb, logical block 0 Buffer I/O error on device vdb, logical block 1 Buffer I/O error on device vdb, logical block 2 Buffer I/O error on device vdb, logical block 3 Buffer I/O error on device vdb, logical block 4 Buffer I/O error on device vdb, logical block 5 Buffer I/O error on device vdb, logical block 6 Buffer I/O error on device vdb, logical block 7 end_request: I/O error, dev vdb, sector 0 Buffer I/O error on device vdb, logical block 0 Buffer I/O error on device vdb, logical block 1 end_request: I/O error, dev vdb, sector 0 unable to read partition table And any I/O - be it reads of writes - fails. I see some aio_submit() etc are happening in strace, but no errors. Unfortunately my strace does not decode io_*() routines. # fgrep io_ trc ... 1227 io_submit(4152147968, 1, {...}) = 1 1226 io_getevents(-142819328, 1, 128, {...}{0, 0}) = 1 1227 io_submit(4152147968, 1, {...}) = 1 1226 io_getevents(-142819328, 1, 128, {...}{0, 0}) = 1 1227 io_submit(4152147968, 1, {...}) = 1 1226 io_getevents(-142819328, 1, 128, {...}{0, 0}) = 1 ... Oh well.... ;) /mjt