All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Cc: zwu.kernel@gmail.com, ryanh@us.ibm.com, qemu-devel@nongnu.org,
	stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v11 1/4] block: add the blockio limits command line support
Date: Wed, 02 Nov 2011 12:32:56 +0100	[thread overview]
Message-ID: <4EB12A68.3020705@redhat.com> (raw)
In-Reply-To: <1320213705-8097-2-git-send-email-wuzhy@linux.vnet.ibm.com>

Am 02.11.2011 07:01, schrieb Zhi Yong Wu:
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
>  block.c         |   40 ++++++++++++++++++++++++++++++++++++++++
>  block.h         |    4 ++++
>  block_int.h     |   29 +++++++++++++++++++++++++++++
>  blockdev.c      |   44 ++++++++++++++++++++++++++++++++++++++++++++
>  qemu-config.c   |   24 ++++++++++++++++++++++++
>  qemu-options.hx |    1 +
>  6 files changed, 142 insertions(+), 0 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 9bb236c..c70f86d 100644
> --- a/block.c
> +++ b/block.c
> @@ -30,6 +30,7 @@
>  #include "qjson.h"
>  #include "qemu-coroutine.h"
>  #include "qmp-commands.h"
> +#include "qemu-timer.h"
>  
>  #ifdef CONFIG_BSD
>  #include <sys/types.h>
> @@ -105,6 +106,37 @@ int is_windows_drive(const char *filename)
>  }
>  #endif
>  
> +/* throttling disk I/O limits */
> +static void bdrv_block_timer(void *opaque)
> +{
> +    BlockDriverState *bs = opaque;
> +
> +    qemu_co_queue_next(&bs->throttled_reqs);
> +}

This runs only one request, whereas in previous versions all queued
requests were resubmitted. Is this change intentional?

> diff --git a/block_int.h b/block_int.h
> index f4547f6..0abe843 100644
> --- a/block_int.h
> +++ b/block_int.h
> @@ -34,6 +34,12 @@
>  #define BLOCK_FLAG_ENCRYPT	1
>  #define BLOCK_FLAG_COMPAT6	4
>  
> +#define BLOCK_IO_LIMIT_READ     0
> +#define BLOCK_IO_LIMIT_WRITE    1
> +#define BLOCK_IO_LIMIT_TOTAL    2
> +
> +#define BLOCK_IO_SLICE_TIME     100000000
> +
>  #define BLOCK_OPT_SIZE          "size"
>  #define BLOCK_OPT_ENCRYPT       "encryption"
>  #define BLOCK_OPT_COMPAT6       "compat6"
> @@ -50,6 +56,16 @@ typedef struct AIOPool {
>      BlockDriverAIOCB *free_aiocb;
>  } AIOPool;
>  
> +typedef struct BlockIOLimit {
> +    int64_t bps[3];
> +    int64_t iops[3];
> +} BlockIOLimit;
> +
> +typedef struct BlockIODisp {
> +    uint64_t bytes[2];
> +    uint64_t ios[2];
> +} BlockIODisp;

I would prefer a different name. Something like BlockIOBaseValue maybe
(no, I don't really like this either, I'm open for suggestions)

Kevin

  reply	other threads:[~2011-11-02 11:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02  6:01 [Qemu-devel] [PATCH v11 0/4] The intro to QEMU block I/O throttling Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 1/4] block: add the blockio limits command line support Zhi Yong Wu
2011-11-02 11:32   ` Kevin Wolf [this message]
2011-11-03  3:11     ` Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 2/4] block: add I/O throttling algorithm Zhi Yong Wu
2011-11-02 11:51   ` Kevin Wolf
2011-11-03  3:18     ` Zhi Yong Wu
2011-11-03  8:03       ` Kevin Wolf
2011-11-03  8:03         ` Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 3/4] hmp/qmp: add block_set_io_throttle Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 4/4] block: perf testing data based on block I/O throttling Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 5/5] lsllsls Zhi Yong Wu
2011-11-02  6:09   ` Zhi Yong Wu

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=4EB12A68.3020705@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.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.