On Thu, Feb 21, 2013 at 11:12:01PM +0100, Paolo Bonzini wrote:
> Il 21/02/2013 22:07, mdroth ha scritto:
> >> > 
> >> > 100% agree.  In particular hw/dataplane/event-poll.c should be the first
> >> > to go away, but AioContext provides the functionality that Ping Fan
> >> > needs.  But hw/dataplane/vring.c will probably be here for a longer
> > Has there been any discussion around introducing something similar to
> > AioContexts for fd handlers? This would avoid the dataplane-specific hooks
> > needed for NetClients in this series.
> 
> AioContext can include file descriptors on POSIX systems (used for NBD
> and other network backends), see aio_set_fd_handler.

Sorry, was using "fd handlers" too generally. I mean specifically for
the qemu_set_fd_handler interfaces, where we currently rely on a single list
of IOHandlerRecords for registration and a single loop to drive them. Would
be nice if we could drive subsets of those via mini main loops, similar to the
way dataplane threads would with a particular AioContext via aio_poll (or 
perhaps
the exact same way)

Currently, Ping Fan's patches basically do this already by accessing a
global reference to the vnet worker thread and attaching events/handlers to
it's event loop via a new set of registration functions (PATCH 7).

I think generalizing this by basing qemu_set_fd_handler() around
AioContext, or something similar, would help to extend support to other
NetClient implementations without requiring dataplane-specific hooks
throughout.

> 
> Paolo
> 

Reply via email to