From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2e6g-0003NG-Qb for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:19:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2e6b-00043t-0o for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:19:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2e6a-00043l-O5 for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:19:04 -0400 Date: Thu, 3 Jul 2014 12:18:57 +0200 From: Kevin Wolf Message-ID: <20140703101857.GF4322@noname.redhat.com> References: <1404303528-7115-1-git-send-email-ming.lei@canonical.com> <1404303528-7115-4-git-send-email-ming.lei@canonical.com> <20140703094420.GE4322@noname.redhat.com> <53B5272E.10703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53B5272E.10703@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , Ming Lei , qemu-devel@nongnu.org, Stefan Hajnoczi Am 03.07.2014 um 11:49 hat Paolo Bonzini geschrieben: > Il 03/07/2014 11:44, Kevin Wolf ha scritto: > >Am 02.07.2014 um 14:18 hat Ming Lei geschrieben: > >>Before commit 580b6b2aa2(dataplane: use the QEMU block > >>layer for I/O), dataplane for virtio-blk submits block > >>I/O as a batch. > >> > >>This commit 580b6b2aa2 replaces the custom linux AIO > >>implementation(including submit I/O as a batch) with QEMU > >>block layer, but this commit causes ~40% throughput regression > >>on virtio-blk performance, and removing submitting I/O > >>as a batch is one of the causes. > >> > >>This patch applies the newly introduced bdrv_io_plug() and > >>bdrv_io_unplug() interfaces to support submitting I/O > >>at batch for Qemu block layer, and in my test, the change > >>can improve throughput by ~30% with 'aio=native'. > >> > >>Following my fio test script: > >> > >> [global] > >> direct=1 > >> size=4G > >> bsrange=4k-4k > >> timeout=40 > >> numjobs=4 > >> ioengine=libaio > >> iodepth=64 > >> filename=/dev/vdc > >> group_reporting=1 > >> > >> [f] > >> rw=randread > >> > >>Result on one of my small machine(host: x86_64, 2cores, 4thread, guest: 4cores): > >> - qemu master: 59K IOPS > >> - qemu master with these patches: 81K IOPS > >> - 2.0.0 release(dataplane using custom linux aio): 104K IOPS > >> > >>Reviewed-by: Paolo Bonzini > >>Signed-off-by: Ming Lei > > > >Reviewing this one doesn't make sense because commit b002254d > >('virtio-blk: Unify {non-,}dataplane's request handlings') removes the > >patched code. You need to patch common virtio-blk code now (which should > >improve non-dataplane virtio-blk as well). > > Actually no, the second and third hunk still apply. The patch you > mentioned unifies request processing, but the loops that fetches > requests from the virtqueue are still separate. This is because > virtio-blk-dataplane still uses the vring API instead of the generic > virtio API. address_space_map/unmap is not thread-safe yet, vring > avoids it. > > Regarding the first hunk, it is not needed at all. Right, I only saw the merge conflict on the first hunk and gave up. I didn't even look at the unapplied patch to see that it's wrong and should be dropped indeed. Kevin