From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, benoit@irqsave.net,
jcody@redhat.com, Peter Lieven <pl@kamp.de>,
mreitz@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 4/4] hw/virtio-blk: add a constant for max number of merged requests
Date: Mon, 20 Oct 2014 16:35:20 +0200 [thread overview]
Message-ID: <1413815720-29976-5-git-send-email-pl@kamp.de> (raw)
In-Reply-To: <1413815720-29976-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>
---
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 6051027..23bc948 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_MERGED_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_MERGED_REQS) {
virtio_submit_multiwrite(req->dev->blk, mrb);
}
--
1.7.9.5
next prev parent reply other threads:[~2014-10-20 14:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 14:35 [Qemu-devel] [PATCH 0/4] multiwrite patches for 2.2 Peter Lieven
2014-10-20 14:35 ` [Qemu-devel] [PATCH 1/4] block: add accounting for merged requests Peter Lieven
2014-10-20 15:08 ` Max Reitz
2014-10-20 14:35 ` [Qemu-devel] [PATCH 2/4] block: introduce bdrv_runtime_opts Peter Lieven
2014-10-20 15:27 ` Max Reitz
2014-10-20 14:35 ` [Qemu-devel] [PATCH 3/4] block: add a knob to disable multiwrite_merge Peter Lieven
2014-10-20 15:41 ` Max Reitz
2014-10-20 14:35 ` Peter Lieven [this message]
2014-10-20 15:51 ` [Qemu-devel] [PATCH 4/4] hw/virtio-blk: add a constant for max number of merged requests Max Reitz
2014-10-20 15:56 ` [Qemu-devel] [PATCH 0/4] multiwrite patches for 2.2 Max Reitz
2014-10-20 20:48 ` Peter Lieven
2014-10-21 7:06 ` Max Reitz
2014-10-21 7:43 ` Peter Lieven
2014-10-21 8:01 ` Peter Lieven
2014-10-21 9:07 ` Max Reitz
2014-10-21 9:38 ` Kevin Wolf
2014-10-21 9:54 ` Max Reitz
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=1413815720-29976-5-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=benoit@irqsave.net \
--cc=famz@redhat.com \
--cc=jcody@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.