From: Eric Blake <eblake@redhat.com>
To: "Benoît Canet" <benoit@irqsave.net>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH V3 for-1.6 1/5] block: Repair the throttling code.
Date: Fri, 26 Jul 2013 13:16:04 -0600 [thread overview]
Message-ID: <51F2CAF4.40103@redhat.com> (raw)
In-Reply-To: <1374596968-20181-2-git-send-email-benoit@irqsave.net>
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
On 07/23/2013 10:29 AM, Benoît Canet wrote:
> The throttling code was segfaulting since commit
> 02ffb504485f0920cfc75a0982a602f824a9a4f4 because some qemu_co_queue_next caller
> does not run in a coroutine.
> qemu_co_queue_do_restart assume that the caller is a coroutinne.
s/assume/assumes/; s/coroutinne/coroutine/
> As suggested by Stefan fix this by entering the coroutine directly.
> Also make sure like suggested that qemu_co_queue_next() and
> qemu_co_queue_restart_all() can be called only in coroutines.
>
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
> block.c | 8 ++++----
> include/block/coroutine.h | 9 +++++++--
> qemu-coroutine-lock.c | 20 ++++++++++++++++++--
> 3 files changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/block.c b/block.c
> index b560241..dc72643 100644
> --- a/block.c
> +++ b/block.c
> @@ -127,7 +127,8 @@ void bdrv_io_limits_disable(BlockDriverState *bs)
> {
> bs->io_limits_enabled = false;
>
> - while (qemu_co_queue_next(&bs->throttled_reqs));
> + while (qemu_co_enter_next(&bs->throttled_reqs)) {
> + }
On first read, I missed the s/queue/enter/ change and thought all you
were doing was the s/;/{}/ change. Is the style change necessary to
keep checkpatch.pl happy? If not, then keeping the old style would draw
better attention to the bug fix.
This patch is worth 1.6, even if the rest of the series is not. I'm not
a coroutine expert, so take this with a grain of salt:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-07-26 19:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 16:29 [Qemu-devel] [PATCH V3 for-1.6 0/5] Leaky bucket throttling and features Benoît Canet
2013-07-23 16:29 ` [Qemu-devel] [PATCH V3 for-1.6 1/5] block: Repair the throttling code Benoît Canet
2013-07-26 19:16 ` Eric Blake [this message]
2013-07-26 19:42 ` Alex Bligh
2013-07-23 16:29 ` [Qemu-devel] [PATCH V3 for-1.6 2/5] block: Modify the throttling code to implement the leaky bucket algorithm Benoît Canet
2013-07-26 3:40 ` Fam Zheng
2013-07-26 9:48 ` Benoît Canet
2013-07-23 16:29 ` [Qemu-devel] [PATCH V3 for-1.6 3/5] block: Add support for throttling burst threshold in QMP and the command line Benoît Canet
2013-07-26 3:07 ` Fam Zheng
2013-07-26 19:24 ` Eric Blake
2013-07-26 20:55 ` Benoît Canet
2013-08-08 13:37 ` Benoît Canet
2013-08-09 7:09 ` Kevin Wolf
2013-07-23 16:29 ` [Qemu-devel] [PATCH V3 for-1.6 4/5] block: Add iops_sector_count to do the iops accounting for a given io size Benoît Canet
2013-07-23 16:29 ` [Qemu-devel] [PATCH V3 for-1.6 5/5] block: Add throttling percentage metrics Benoît Canet
2013-07-26 2:55 ` Fam Zheng
2013-07-26 9:49 ` Benoît Canet
2013-07-25 12:08 ` [Qemu-devel] [PATCH V3 for-1.6 0/5] Leaky bucket throttling and features Fam Zheng
2013-07-25 12:16 ` Benoît Canet
2013-07-26 19:07 ` Eric Blake
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=51F2CAF4.40103@redhat.com \
--to=eblake@redhat.com \
--cc=benoit@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).