qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] Fix "stop" draining block jobs


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 0/3] Fix "stop" draining block jobs
Date: Fri, 03 Apr 2015 13:10:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 03/04/2015 12:38, Fam Zheng wrote:
> Stopping the vm will drive the block job all the way to the end, because the
> sleep duration is too short, which means the block_job_sleep_ns in the block
> jobs are unhelpful. That is because the timer will fire too soon, even before
> the aio_poll in bdrv_drain_all returns.
> 
> Lengthen the sleep and add a test case to catch this issue in the future.
> 
> It's not perfect, because the aio_poll returning point could still be far
> enough that we wake up the job earlier, but this patch is already making it
> better in common cases - setting up a timer with timeout=0 was definitely too
> short anyway.
> 
> A complete solution would be adding a "sleep until next iteration" timer/BH
> API, but I'm not sure that is worth the complexity.

Would it work if vm_stop pauses block jobs before drain, and restarts
the paused ones afterwards?

Paolo



reply via email to

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