Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Paolo Bonzini
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 th

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Fam Zheng
On Thu, 05/28 14:01, Paolo Bonzini wrote: > > > On 28/05/2015 13:49, Fam Zheng wrote: > > On Thu, 05/28 13:19, Paolo Bonzini wrote: > >> > >> > >> On 28/05/2015 13:16, Fam Zheng wrote: > On 28/05/2015 03:46, Fam Zheng wrote: > > The main context uses iohandler and aio_dispatch, neither c

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Paolo Bonzini
On 28/05/2015 13:49, Fam Zheng wrote: > On Thu, 05/28 13:19, Paolo Bonzini wrote: >> >> >> On 28/05/2015 13:16, Fam Zheng wrote: On 28/05/2015 03:46, Fam Zheng wrote: > The main context uses iohandler and aio_dispatch, neither calls > aio_set_dispatching(). However, if we have [2], t

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Fam Zheng
On Thu, 05/28 13:19, Paolo Bonzini wrote: > > > On 28/05/2015 13:16, Fam Zheng wrote: > > > On 28/05/2015 03:46, Fam Zheng wrote: > > > > The main context uses iohandler and aio_dispatch, neither calls > > > > aio_set_dispatching(). However, if we have [2], they can be changed to > > > > aio_poll

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Paolo Bonzini
On 28/05/2015 13:16, Fam Zheng wrote: > > On 28/05/2015 03:46, Fam Zheng wrote: > > > The main context uses iohandler and aio_dispatch, neither calls > > > aio_set_dispatching(). However, if we have [2], they can be changed to > > > aio_poll(), then would this idea work? > > > > I think it's a b

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Fam Zheng
On Thu, 05/28 10:21, Paolo Bonzini wrote: > > > On 28/05/2015 03:46, Fam Zheng wrote: > > The main context uses iohandler and aio_dispatch, neither calls > > aio_set_dispatching(). However, if we have [2], they can be changed to > > aio_poll(), then would this idea work? > > I think it's a bad i

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-28 Thread Paolo Bonzini
On 28/05/2015 03:46, Fam Zheng wrote: > The main context uses iohandler and aio_dispatch, neither calls > aio_set_dispatching(). However, if we have [2], they can be changed to > aio_poll(), then would this idea work? I think it's a bad idea to handle aio_poll for context B in a different way, j

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-27 Thread Fam Zheng
On Wed, 05/27 11:38, Paolo Bonzini wrote: > > > On 27/05/2015 09:19, Fam Zheng wrote: > > This series looks at the other side of the broken "qmp transaction" problem > > with dataplane [1] - the event loop. > > > > Before, an ioeventfd of a non-dataplane device is registered via > > qemu_set_fd_

Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-27 Thread Paolo Bonzini
On 27/05/2015 09:19, Fam Zheng wrote: > This series looks at the other side of the broken "qmp transaction" problem > with dataplane [1] - the event loop. > > Before, an ioeventfd of a non-dataplane device is registered via > qemu_set_fd_handler, which is only polled directly by main_loop_wait()

[Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()

2015-05-27 Thread Fam Zheng
This series looks at the other side of the broken "qmp transaction" problem with dataplane [1] - the event loop. Before, an ioeventfd of a non-dataplane device is registered via qemu_set_fd_handler, which is only polled directly by main_loop_wait(), not in aio_poll(); an ioeventfd of a dataplane d