[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/5] blockjob: add pause points
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/5] blockjob: add pause points |
Date: |
Wed, 15 Jun 2016 10:53:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
On 14/06/2016 20:17, Stefan Hajnoczi wrote:
> Block jobs are coroutines that usually perform I/O but sometimes also
> sleep or yield. Currently only sleeping or yielded block jobs can be
> paused. This means jobs that do not sleep or yield (using
> block_job_yield()) are unaffected by block_job_pause().
>
> Add block_job_pause_point() so that block jobs can mark quiescent points
> that are suitable for pausing. This solves the problem that it can take
> a block job a long time to pause if it is performing a long series of
> I/O operations.
>
> Transitioning to paused state involves a .pause()/.resume() callback.
> These callbacks are used to ensure that I/O and event loop activity has
> ceased while the job is at a pause point.
>
> Note that this patch introduces a stricter pause state than previously.
> The job->busy flag was incorrectly documented as a quiescent state
> without I/O pending. This is violated by any job that has I/O pending
> across sleep or block_job_yield(), like the mirror block job.
Right, we should document job->busy as a quiescent state where no one
will re-enter the coroutine.
Paolo
[Qemu-devel] [PATCH v4 2/5] blockjob: add pause points, Stefan Hajnoczi, 2016/06/14
- Re: [Qemu-devel] [PATCH v4 2/5] blockjob: add pause points,
Paolo Bonzini <=
Re: [Qemu-devel] [PATCH v4 2/5] blockjob: add pause points, Fam Zheng, 2016/06/15
[Qemu-devel] [PATCH v4 1/5] blockjob: move iostatus reset out of block_job_enter(), Stefan Hajnoczi, 2016/06/14
[Qemu-devel] [PATCH v4 5/5] backup: follow AioContext change gracefully, Stefan Hajnoczi, 2016/06/14
[Qemu-devel] [PATCH v4 3/5] blockjob: add AioContext attached callback, Stefan Hajnoczi, 2016/06/14