qemu-block
[Top][All Lists]
Advanced

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

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


From: Fam Zheng
Subject: Re: [Qemu-block] [PATCH 0/3] Fix "stop" draining block jobs
Date: Fri, 3 Apr 2015 20:30:01 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, 04/03 13:10, Paolo Bonzini wrote:
> 
> 
> 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?

Yeah. It would. Will need a bit more code, but still be a neat solution.

Fam




reply via email to

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