qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	pbonzini@redhat.com, berto@igalia.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4] block: Switch to host monotonic clock for IO throttling
Date: Wed, 25 Mar 2015 15:31:10 +0000	[thread overview]
Message-ID: <20150325153110.GA11124@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1427268446-6426-1-git-send-email-famz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

On Wed, Mar 25, 2015 at 03:27:26PM +0800, Fam Zheng wrote:
> Currently, throttle timers won't make any progress when VCPU is not
> running, which would stall the request queue in utils, qtest, vm
> suspending, and live migration, without special handling.
> 
> Block jobs are confusingly inconsistent between with and without
> throttling: if user sets a bps limit, stops the vm, then start a block
> job, the block job will not make any progress; in contrary, if user
> unsets the bps limit, or if it's not set, the block job will run
> normally.
> 
> After this patch, with the host clock, even if the VCPUs are stopped,
> the throttle queues will be processed.
> 
> This patch also enables potential to add throttle to bdrv_drain_all.
> Currently all requests are drained immediately. In other words whenever
> it is called, IO throttling goes ineffective (examples: system reset,
> migration and many block job operations.). This is a loophole that guest
> could exploit. If we use the host clock, we can later just trust the
> nested poll. This could be done on top.
> 
> Note that for qemu-iotests case 093, which uses qtest, we still keep vm
> clock so the script can control the clock stepping in order to be
> deterministic.
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Alberto Garcia <berto@igalia.com>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> ---
> v4: Fix the description. [Alberto]
> v3: More justification in commit message. [Stefan]
>     Add Paolo's and Alberto's rev-bys.
> v2: Don't break qemu-iotests 093.
> ---
>  block.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Queued for QEMU 2.4.  Please let me know if you think it's worth risking
adding it in QEMU 2.3.

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-03-25 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  7:27 [Qemu-devel] [PATCH v4] block: Switch to host monotonic clock for IO throttling Fam Zheng
2015-03-25 15:31 ` Stefan Hajnoczi [this message]
2015-03-26  2:03   ` Fam Zheng

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=20150325153110.GA11124@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=berto@igalia.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).