qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.10] qemu-iotests: step clock after each te


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.10] qemu-iotests: step clock after each test iteration
Date: Tue, 15 Aug 2017 08:43:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/15/2017 08:05 AM, Stefan Hajnoczi wrote:
> The 093 throttling test submits twice as many requests as the throttle
> limit in order to ensure that we reach the limit.  The remaining
> requests are left in-flight at the end of each test iteration.
> 
> Commit 452589b6b47e8dc6353df257fc803dfc1383bed8 ("vl.c/exit: pause cpus
> before closing block devices") exposed a hang in 093.  This happens
> because requests are still in flight when QEMU terminates but
> QEMU_CLOCK_VIRTUAL time is frozen.  bdrv_drain_all() hangs forever since
> throttled requests cannot complete.
> 
> Step the clock at the end of each test iteration so in-flight requests
> actually finish.  This solves the hang and is cleaner than leaving tests
> in-flight.
> 
> Note that this could also be "fixed" by disabling throttling when drives
> are closed in QEMU.  That approach has two issues:
> 
> 1. We must drain requests before disabling throttling, so the hang
>    cannot be easily avoided!
> 
> 2. Any time QEMU disables throttling internally there is a chance that
>    malicious users can abuse the code path to bypass throttling limits.
> 
> Therefore it makes more sense to fix the test case than to modify QEMU.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  tests/qemu-iotests/093 | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Reviewed-by: Eric Blake <address@hidden>

I can take this through the NBD tree (since that's one environment that
trips up on the test), if Peter doesn't apply it directly.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]