From: Fam Zheng <famz@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, benoit@irqsave.net, qemu-devel@nongnu.org,
ming.lei@canonical.com, armbru@redhat.com, mreitz@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/4] hw/virtio-blk: add a constant for max number of merged requests
Date: Wed, 10 Dec 2014 12:54:35 +0800 [thread overview]
Message-ID: <20141210045435.GA32726@ad.nay.redhat.com> (raw)
In-Reply-To: <1418142410-19057-3-git-send-email-pl@kamp.de>
On Tue, 12/09 17:26, Peter Lieven wrote:
> 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: Eric Blake <eblake@redhat.com>
> ---
> hw/block/virtio-blk.c | 2 +-
> include/hw/virtio/virtio-blk.h | 4 +++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index b19b102..490f961 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -326,7 +326,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 == VIRTIO_BLK_MAX_MERGE_REQS) {
> virtio_submit_multiwrite(req->dev->blk, mrb);
> }
>
> diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
> index 3979dc4..3f2652f 100644
> --- a/include/hw/virtio/virtio-blk.h
> +++ b/include/hw/virtio/virtio-blk.h
> @@ -134,8 +134,10 @@ typedef struct VirtIOBlock {
> struct VirtIOBlockDataPlane *dataplane;
> } VirtIOBlock;
>
> +#define VIRTIO_BLK_MAX_MERGE_REQS 32
> +
> typedef struct MultiReqBuffer {
> - BlockRequest blkreq[32];
> + BlockRequest blkreq[VIRTIO_BLK_MAX_MERGE_REQS];
> unsigned int num_writes;
> } MultiReqBuffer;
>
> --
> 1.7.9.5
>
>
Reviewed-by: Fam Zheng <famz@redhat.com>
next prev parent reply other threads:[~2014-12-10 5:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 16:26 [Qemu-devel] [PATCH 0/4] virtio-blk: add multiread support Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 1/4] block: add accounting for merged requests Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 2/4] hw/virtio-blk: add a constant for max number of " Peter Lieven
2014-12-10 4:54 ` Fam Zheng [this message]
2014-12-09 16:26 ` [Qemu-devel] [PATCH 3/4] block-backend: expose bs->bl.max_transfer_length Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 4/4] virtio-blk: introduce multiread Peter Lieven
2014-12-10 7:48 ` Fam Zheng
2014-12-11 13:07 ` Peter Lieven
2014-12-15 15:01 ` Kevin Wolf
2014-12-15 15:43 ` Peter Lieven
2014-12-15 15:52 ` Peter Lieven
2014-12-15 16:00 ` Kevin Wolf
2014-12-15 16:02 ` Peter Lieven
2014-12-15 15:57 ` Kevin Wolf
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=20141210045435.GA32726@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=ming.lei@canonical.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--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).