qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()
Date: Thu, 28 May 2015 15:42:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 28/05/2015 14:26, Fam Zheng wrote:
> > > > Right, but the two sets of iohandlers are stored in different places, so
> > > > it's obvious that you don't execute all of them.  On the other hand,
> > > > examining global state in aio_poll is really bad.
> > > 
> > > OK.
> > > 
> > > Would moving the ioeventfds to a new top level aio_loop_wait() be any 
> > > better?
> > > That way no global state is needed.
> > 
> > If we need pause/resume anyway due to block/mirror.c's use of
> > block_job_defer_to_main_loop, I think this is not a problem anymore?
> 
> I also hope to dedup the iohandler code with async.c, on top of [2]; and in 
> the
> longer term, convert slirp to use AioContext API too, so that all
> *_pollfds_fill() will not be necessary - the whole event loop goes epoll 
> style.

You can use separate AioContexts for that: one for block devices, one
for (former) iohandlers.  The two AioContexts then can live together in
the main loop because the main loop just treats AioContexts as GSources.

However, this does not help with ioeventfds, for which we need pause/resume.

Paolo



reply via email to

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