From: Fam Zheng <famz@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests
Date: Thu, 26 May 2016 15:10:24 +0800 [thread overview]
Message-ID: <20160526071024.GB10734@ad.usersys.redhat.com> (raw)
In-Reply-To: <20160526065045.GA10734@ad.usersys.redhat.com>
On Thu, 05/26 14:50, Fam Zheng wrote:
> On Tue, 05/24 16:30, Peter Lieven wrote:
> > in a read-modify-write cycle a small request might cause
> > head and tail to fall into the same aligned block. Currently
> > QEMU reads the same block twice in this case which is
> > not necessary.
> >
> > Signed-off-by: Peter Lieven <pl@kamp.de>
>
> Thanks, applied to my block branch:
>
> https://github.com/famz/qemu/tree/block
>
Looks like this breaks iotests 077 (hang), the blkdebug break points expected
by the script are not hit now. While squashing in below patch fixes the case, I
think it is more appropriate to keep the patch as is and fix the case itself.
Dropped from my queue, please send another version with test case update so I
can apply together.
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);
}
}
next prev parent reply other threads:[~2016-05-26 7:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 14:30 [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests Peter Lieven
2016-05-24 15:07 ` Kevin Wolf
2016-05-26 6:50 ` Fam Zheng
2016-05-26 7:10 ` Fam Zheng [this message]
2016-05-26 7:55 ` Paolo Bonzini
2016-05-26 8:30 ` Fam Zheng
2016-05-26 9:20 ` Paolo Bonzini
2016-05-27 0:36 ` Fam Zheng
2016-05-27 8:55 ` Kevin Wolf
2016-05-30 6:25 ` Peter Lieven
2016-05-30 8:24 ` Kevin Wolf
2016-05-30 9:30 ` Peter Lieven
2016-05-30 9:47 ` Kevin Wolf
2016-05-30 9:53 ` Peter Lieven
2016-05-30 10:06 ` Kevin Wolf
2016-05-30 10:10 ` Peter Lieven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160526071024.GB10734@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).