[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush()
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush() |
Date: |
Fri, 12 Apr 2013 11:49:36 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Apr 12, 2013 at 10:02:02AM +0200, Kevin Wolf wrote:
> Am 11.04.2013 um 17:44 hat Stefan Hajnoczi geschrieben:
> > Here's my entry to the "let's get rid of io_flush()" effort. It's based on
> > Paolo's insight about bdrv_drain_all() that the block layer already has a
> > tracked_requests list. io_flush() is redundant since the block layer
> > already
> > knows if requests are pending.
>
> Except when there are requests that don't come from the guest, but are
> issued internally. In this case, block.c doesn't know about them, but
> only the block driver does, so we need a .bdrv_drain callback to tell
> the block layer about these.
>
> The one specific case that comes to mind is the QED timer for resetting
> the dirty bit. I think you need to have the .bdrv_drain callback before
> you can start ignoring .io_flush.
I think .bdrv_drain() might come in handy in the future if we need it.
Regarding the QED timer, it does not hook into bdrv_drain_all() today.
The semantics are unchanged with this patch series applied.
The timer runs while the guest is running (vm_clock). It doesn't fire
during synchronous I/O since qemu_aio_wait() does not dispatch timers.
When the image file is closed the need check bit is also cleared. This
way, the file is marked clean even if the need check timer was pending.
The upshot of the current QED code is that we might consistency check
the image file during live migration since the image is not closed on
the source (therefore the need check bit is not guaranteed to be
cleared).
Anyway, dropping io_flush() doesn't break the timer.
Stefan
- [Qemu-devel] [RFC 05/13] block/gluster: drop qemu_gluster_aio_flush_cb(), (continued)
- [Qemu-devel] [RFC 05/13] block/gluster: drop qemu_gluster_aio_flush_cb(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 01/13] block: stop relying on io_flush() in bdrv_drain_all(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 10/13] block/sheepdog: drop have_co_req() and aio_flush_request(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 09/13] block/rbd: drop qemu_rbd_aio_flush_cb(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 13/13] aio: drop io_flush argument, Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 06/13] block/iscsi: drop iscsi_process_flush(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 04/13] block/curl: drop curl_aio_flush(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 08/13] block/nbd: drop nbd_have_request(), Stefan Hajnoczi, 2013/04/11
- [Qemu-devel] [RFC 02/13] dataplane/virtio-blk: check exit conditions before aio_poll(), Stefan Hajnoczi, 2013/04/11
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(),
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Paolo Bonzini, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Stefan Hajnoczi, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush(), Stefan Hajnoczi, 2013/04/12