From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support
Date: Wed, 14 May 2014 17:14:52 +0200 [thread overview]
Message-ID: <20140514151452.GD5955@irqsave.net> (raw)
In-Reply-To: <1400077367-23409-1-git-send-email-stefanha@redhat.com>
The Wednesday 14 May 2014 à 16:22:44 (+0200), Stefan Hajnoczi wrote :
> This series applies on top of my "dataplane: use QEMU block layer" series.
>
> Now that the dataplane code path is using the QEMU block layer we should make
> I/O throttling limits safe to use. When the block_set_io_throttle monitor
> command is executed, the BlockDriverState's AioContext must be acquired in
> order to prevent race conditions with the IOThread that is processing requests
> from the guest.
>
> The new block layer AioContext detach/attach mechanism needs to be extended to
> move the throttling timer to a new AioContext. This makes throttling work
> across bdrv_set_aio_context() calls.
>
> The result of this series is that I/O throttling works with dataplane and
> limits may be changed at runtime using the monitor.
>
> Stefan Hajnoczi (3):
> throttle: add throttle_detach/attach_aio_context()
> throttle: add detach/attach test case
> blockdev: acquire AioContext in block_set_io_throttle
>
> block.c | 7 +++++++
> blockdev.c | 6 ++++++
> include/qemu/throttle.h | 10 ++++++++++
> tests/test-throttle.c | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
> util/throttle.c | 27 +++++++++++++++++++++++----
> 5 files changed, 90 insertions(+), 9 deletions(-)
>
> --
> 1.9.0
>
As a side note the throttling code does eat some CPU time.
So if people starts using throttling with dataplane by setting 50k iops as a limit
the timers callback will start to kill half a core.
The solution could be to optionaly make the throttling resolution coarser.
I have future plan to do this for SSD usage
Best regards
Benoît
next prev parent reply other threads:[~2014-05-14 15:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 14:22 [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support Stefan Hajnoczi
2014-05-14 14:22 ` [Qemu-devel] [PATCH 1/3] throttle: add throttle_detach/attach_aio_context() Stefan Hajnoczi
2014-05-14 15:05 ` Benoît Canet
2014-05-15 7:57 ` Stefan Hajnoczi
2014-05-15 11:25 ` Benoît Canet
2014-05-14 14:22 ` [Qemu-devel] [PATCH 2/3] throttle: add detach/attach test case Stefan Hajnoczi
2014-05-14 15:08 ` Benoît Canet
2014-05-14 14:22 ` [Qemu-devel] [PATCH 3/3] blockdev: acquire AioContext in block_set_io_throttle Stefan Hajnoczi
2014-05-14 15:11 ` Benoît Canet
2014-05-14 15:14 ` Benoît Canet [this message]
2014-05-14 17:40 ` [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support Benoît Canet
2014-05-15 7:46 ` Stefan Hajnoczi
2014-06-03 13:44 ` Stefan Hajnoczi
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=20140514151452.GD5955@irqsave.net \
--to=benoit.canet@irqsave.net \
--cc=kwolf@redhat.com \
--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).