[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_p
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_poll() |
Date: |
Thu, 7 Feb 2013 09:24:05 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Feb 06, 2013 at 07:24:42PM +0100, Laszlo Ersek wrote:
> On 02/04/13 13:12, Stefan Hajnoczi wrote:
> > We will need to loop over AioHandlers calling ->io_read()/->io_write()
> > when aio_poll() is converted from select(2) to g_poll(2).
> >
> > Luckily the code for this already exists, extract it into the new
> > aio_dispatch() function.
> >
> > Two small changes:
> >
> > * aio_poll() checks !node->deleted to avoid calling handlers that have
> > been deleted.
>
> This is actually an unrelated bugfix, isn't it?
It is related because there are two copies of the aio handler dispatch
code - one for glib and one for select. The !node->deleted check is
present in the select version of the loop but not in the glib version.
In the next patch I get rid of select version and reuse the function
extracted from the glib version by this patch. I wouldn't be confident
in reusing the extracted function without !node->deleted.
Stefan
- Re: [Qemu-devel] [PATCH v3 06/10] iohandler: switch to GPollFD, (continued)
- [Qemu-devel] [PATCH v3 05/10] slirp: switch to GPollFD, Stefan Hajnoczi, 2013/02/04
- [Qemu-devel] [PATCH v3 04/10] slirp: slirp/slirp.c coding style cleanup, Stefan Hajnoczi, 2013/02/04
- [Qemu-devel] [PATCH v3 07/10] main-loop: drop rfds/wfds/xfds for good, Stefan Hajnoczi, 2013/02/04
- [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_poll(), Stefan Hajnoczi, 2013/02/04
- [Qemu-devel] [PATCH v3 09/10] aio: convert aio_poll() to g_poll(3), Stefan Hajnoczi, 2013/02/04
- [Qemu-devel] [PATCH v3 10/10] aio: support G_IO_HUP and G_IO_ERR, Stefan Hajnoczi, 2013/02/04