From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, benoit@irqsave.net,
Peter Lieven <pl@kamp.de>,
armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCHv3 4/6] hw/virtio-blk: add a constant for max number of merged requests
Date: Sat, 25 Oct 2014 18:55:51 +0200 [thread overview]
Message-ID: <1414256153-10148-5-git-send-email-pl@kamp.de> (raw)
In-Reply-To: <1414256153-10148-1-git-send-email-pl@kamp.de>
As it was not obvious (at least for me) where the 32 comes from;
add a constant for it.
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
hw/block/virtio-blk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b19b102..ee7789f 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -308,6 +308,8 @@ static bool virtio_blk_sect_range_ok(VirtIOBlock *dev,
return true;
}
+#define MAX_MERGE_REQS 32
+
static void virtio_blk_handle_write(VirtIOBlockReq *req, MultiReqBuffer *mrb)
{
BlockRequest *blkreq;
@@ -326,7 +328,7 @@ static void virtio_blk_handle_write(VirtIOBlockReq *req, MultiReqBuffer *mrb)
block_acct_start(blk_get_stats(req->dev->blk), &req->acct, req->qiov.size,
BLOCK_ACCT_WRITE);
- if (mrb->num_writes == 32) {
+ if (mrb->num_writes == MAX_MERGE_REQS) {
virtio_submit_multiwrite(req->dev->blk, mrb);
}
--
1.7.9.5
next prev parent reply other threads:[~2014-10-25 16:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-25 16:55 [Qemu-devel] [PATCHv3 0/6] multiwrite patches for 2.2 Peter Lieven
2014-10-25 16:55 ` [Qemu-devel] [PATCHv3 1/6] block: add accounting for merged requests Peter Lieven
2014-10-27 8:50 ` Max Reitz
2014-10-28 11:01 ` Stefan Hajnoczi
2014-10-25 16:55 ` [Qemu-devel] [PATCHv3 2/6] block: introduce bdrv_runtime_opts Peter Lieven
2014-10-28 11:14 ` Stefan Hajnoczi
2014-10-28 11:41 ` Max Reitz
2014-10-25 16:55 ` [Qemu-devel] [PATCHv3 3/6] block: add a knob to disable multiwrite_merge Peter Lieven
2014-10-28 11:11 ` Stefan Hajnoczi
2014-10-28 11:26 ` Peter Lieven
2014-10-31 8:31 ` Peter Lieven
2014-10-31 10:59 ` Stefan Hajnoczi
2014-11-27 9:32 ` Peter Lieven
2014-10-28 15:22 ` Eric Blake
2014-10-25 16:55 ` Peter Lieven [this message]
2014-10-28 11:17 ` [Qemu-devel] [PATCHv3 4/6] hw/virtio-blk: add a constant for max number of merged requests Stefan Hajnoczi
2014-10-31 8:32 ` Peter Lieven
2014-10-25 16:55 ` [Qemu-devel] [PATCHv3 5/6] block: add qemu-iotest for write-merge parameter Peter Lieven
2014-10-27 9:08 ` Max Reitz
2014-10-27 9:12 ` Peter Lieven
2014-10-25 16:55 ` [Qemu-devel] [PATCHv3 6/6] block: fix qemu-iotest reference output for test 067 Peter Lieven
2014-10-28 11:20 ` Stefan Hajnoczi
2014-10-28 10:58 ` [Qemu-devel] [PATCHv3 0/6] multiwrite patches for 2.2 Stefan Hajnoczi
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=1414256153-10148-5-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=armbru@redhat.com \
--cc=benoit@irqsave.net \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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).