qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com,
	stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, ryanh@us.ibm.com, vgoyal@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.
Date: Thu, 28 Jul 2011 11:42:11 -0300	[thread overview]
Message-ID: <20110728144211.GA17754@amt.cnet> (raw)
In-Reply-To: <CAEH94LibyMN9=8gGBYE15Wva7GR0BBBWmbjTaWdcLO8psbHGYA@mail.gmail.com>

On Thu, Jul 28, 2011 at 12:24:48PM +0800, Zhi Yong Wu wrote:
> On Wed, Jul 27, 2011 at 11:49 PM, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> > On Wed, Jul 27, 2011 at 06:17:15PM +0800, Zhi Yong Wu wrote:
> >> >> +        wait_time = 1;
> >> >> +    }
> >> >> +
> >> >> +    wait_time = wait_time + (slice_time - elapsed_time);
> >> >> +    if (wait) {
> >> >> +        *wait = wait_time * BLOCK_IO_SLICE_TIME * 10 + 1;
> >> >> +    }
> >> >
> >> > The guest can keep submitting requests where "wait_time = 1" above,
> >> > and the timer will be rearmed continuously in the future.
> >
> > This is wrong.
> >
> >>  Can't you
> >> > simply arm the timer to the next slice start? _Some_ data must be
> >> > transfered by then, anyway (and nothing can be transfered earlier than
> >> > that).
> >
> > This is valid.
> >
> >> Sorry, i have got what you mean. Can you elaborate in more detail?
> >
> > Sorry, the bug i mentioned about timer being rearmed does not exist.
> >
> > But arming the timer for the last request as its done is confusing/unnecessary.
> >
> > The timer processes queued requests, but the timer is armed accordingly
> > to the last queued request in the slice. For example, if a request is
> > submitted 1ms before the slice ends, the timer is armed 100ms +
> > (slice_time - elapsed_time) in the future.
> 
> If the timer is simply amred to the next slice start, this timer will
> be a periodic timer, either the I/O rate can not be throttled under
> the limits, or the enqueued request can be delayed to handled, this
> will lower I/O rate seriously than the limits.

Yes, periodic but disarmed when there is no queueing. I don't understand
your point about low I/O rate.

> Maybe the slice time should be variable with current I/O rate. What do
> you think of it?

Not sure if its necessary. The slice should be small to avoid excessive
work on timer context, but the advantage of increasing the slice is
very small if any. BTW, 10ms seems a better default than 100ms.

  reply	other threads:[~2011-07-28 14:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26  8:59 [Qemu-devel] [PATCH v2 0/1] The intro for QEMU disk I/O limits Zhi Yong Wu
2011-07-26  8:59 ` [Qemu-devel] [PATCH v2 1/1] The codes V2 " Zhi Yong Wu
2011-07-26 19:26   ` Marcelo Tosatti
2011-07-26 21:51     ` [Qemu-devel] [PATCH 04/25] Add hard build dependency on glib Yoder Stuart-B08248
2011-07-26 22:09       ` Anthony Liguori
2011-07-27  8:54         ` Benjamin Herrenschmidt
2011-07-27 13:31           ` David Gibson
2011-07-27 13:13         ` Yoder Stuart-B08248
2011-07-27 10:17     ` [Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits Zhi Yong Wu
2011-07-27 12:58       ` Stefan Hajnoczi
2011-07-28  2:35         ` Zhi Yong Wu
2011-07-28  5:43         ` Zhi Yong Wu
2011-07-28  8:20           ` Stefan Hajnoczi
2011-07-28  8:25             ` Stefan Hajnoczi
2011-07-28  8:50               ` Zhi Yong Wu
2011-07-27 15:49       ` Marcelo Tosatti
2011-07-28  4:24         ` Zhi Yong Wu
2011-07-28 14:42           ` Marcelo Tosatti [this message]
2011-07-29  2: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=20110728144211.GA17754@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=vgoyal@redhat.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 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).