[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] throttle-groups: cancel timers on restart
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3] throttle-groups: cancel timers on restart |
Date: |
Mon, 25 Sep 2017 10:37:44 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/25/2017 08:57 AM, Stefan Hajnoczi wrote:
> Throttling group members are restarted on config change and by
> bdrv_drained_begin(). Pending timers should be cancelled before
> restarting the queue, otherwise requests see that tg->any_timer_armed[]
> is already set and do not schedule a timer.
>
> For example, a hang occurs at least since QEMU 2.10.0 with -drive
> iops=100 because no further timers will be scheduled:
>
> (guest)$ dd if=/dev/zero of=/dev/vdb oflag=direct count=1000
> (qemu) stop
> (qemu) cont
> ...I/O is stuck...
>
> This can be fixed by calling throttle_group_detach_aio_context() from a
> bdrv_drained_begin/end() region. This way timers are quiesced properly,
> requests are drained, and other throttle group members are scheduled, if
> necessary.
>
> Reported-by: Yongxue Hong <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature