From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5qgV-0000fL-1J for qemu-devel@nongnu.org; Thu, 26 May 2016 04:30:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5qgT-00006U-1K for qemu-devel@nongnu.org; Thu, 26 May 2016 04:30:25 -0400 Date: Thu, 26 May 2016 16:30:16 +0800 From: Fam Zheng Message-ID: <20160526083016.GD31052@ad.usersys.redhat.com> References: <1464100220-21317-1-git-send-email-pl@kamp.de> <20160526065045.GA10734@ad.usersys.redhat.com> <20160526071024.GB10734@ad.usersys.redhat.com> <413c4af8-ba30-bfbf-9a84-d1d92ddac0e4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <413c4af8-ba30-bfbf-9a84-d1d92ddac0e4@redhat.com> Subject: Re: [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Lieven , kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com On Thu, 05/26 09:55, Paolo Bonzini wrote: > > > On 26/05/2016 09:10, Fam Zheng wrote: > > > > diff --git a/block/io.c b/block/io.c > > index d480097..a6523cf 100644 > > --- a/block/io.c > > +++ b/block/io.c > > @@ -1435,8 +1435,10 @@ int coroutine_fn bdrv_co_pwritev(BlockDriverState *bs, > > * than one aligned block. > > */ > > if (bytes < align) { > > + bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); > > qemu_iovec_add(&local_qiov, head_buf + bytes, align - bytes); > > bytes = align; > > + bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_TAIL); > > } > > } > > This doesn't look too wrong... Should the right sequence of events be > head/after_head or head/after_tail? It's probably simplest to just emit > all four events. I've no idea. (That's why I leaned towards fixing the test case). But if Kevin can ack, I'd be happy with this way. Fam