qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Peter Lieven <pl@kamp.de>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, jcody@redhat.com, famz@redhat.com,
	benoit@irqsave.net, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/virtio-blk: add a constant for max number of merged requests
Date: Mon, 20 Oct 2014 17:51:05 +0200	[thread overview]
Message-ID: <54452F69.6080209@redhat.com> (raw)
In-Reply-To: <1413815720-29976-5-git-send-email-pl@kamp.de>

On 20.10.2014 at 16:35, Peter Lieven wrote:
> As it was not obvious (at least for me) where the 32 comes from
> add a constant for it.

This needs some separator ("...comes from; add a..." or something like 
that).

> 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);
>       }
>   

I wouldn't have used the past form, but simply MAX_MERGE_REQS or, more 
complicated, MAX_MERGE_REQ_COUNT. But I'm me, and this mail's "From" 
field says it's not from me.

Reviewed-by: Max Reitz <mreitz@redhat.com>

  reply	other threads:[~2014-10-20 15:51 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 ` [Qemu-devel] [PATCH 4/4] hw/virtio-blk: add a constant for max number of merged requests Peter Lieven
2014-10-20 15:51   ` Max Reitz [this message]
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=54452F69.6080209@redhat.com \
    --to=mreitz@redhat.com \
    --cc=benoit@irqsave.net \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@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).