Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Fam Zheng
On Fri, 09/11 13:02, Paolo Bonzini wrote: > > > On 11/09/2015 13:01, Fam Zheng wrote: > > On Fri, 09/11 12:46, Paolo Bonzini wrote: > >> > >> > >> On 11/09/2015 12:40, Fam Zheng wrote: > >>> On Fri, 09/11 11:54, Paolo Bonzini wrote: > > > On 11/09/2015 11:44, Fam Zheng wrote: > >>>

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Paolo Bonzini
On 11/09/2015 13:01, Fam Zheng wrote: > On Fri, 09/11 12:46, Paolo Bonzini wrote: >> >> >> On 11/09/2015 12:40, Fam Zheng wrote: >>> On Fri, 09/11 11:54, Paolo Bonzini wrote: On 11/09/2015 11:44, Fam Zheng wrote: That would be a step back. Using GSource is useful because

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Fam Zheng
On Fri, 09/11 12:46, Paolo Bonzini wrote: > > > On 11/09/2015 12:40, Fam Zheng wrote: > > On Fri, 09/11 11:54, Paolo Bonzini wrote: > >> > >> > >> On 11/09/2015 11:44, Fam Zheng wrote: > >> That would be a step back. Using GSource is useful because it lets > >> you integrate libraries su

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Paolo Bonzini
On 11/09/2015 12:40, Fam Zheng wrote: > On Fri, 09/11 11:54, Paolo Bonzini wrote: >> >> >> On 11/09/2015 11:44, Fam Zheng wrote: >> That would be a step back. Using GSource is useful because it lets >> you integrate libraries such as GTK+. > > Can we move GTK to a separate GSourc

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Fam Zheng
On Fri, 09/11 11:54, Paolo Bonzini wrote: > > > On 11/09/2015 11:44, Fam Zheng wrote: > > > > > That would be a step back. Using GSource is useful because it lets > > > > > you integrate libraries such as GTK+. > > > > > > > > Can we move GTK to a separate GSource thread? > > > > > > I think th

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Paolo Bonzini
On 11/09/2015 11:44, Fam Zheng wrote: > > > > That would be a step back. Using GSource is useful because it lets > > > > you integrate libraries such as GTK+. > > > > > > Can we move GTK to a separate GSource thread? > > > > I think that GTK should always run in the main thread, or at least the

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Paolo Bonzini
On 11/09/2015 11:36, Alberto Garcia wrote: > > > > Because nested aio_poll will automatically be limited to only > > > > process block layer events. My idea is to eventually let main loop > > > > use aio_poll > > > > > > That would be a step back. Using GSource is useful because it lets > > > y

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Fam Zheng
On Fri, 09/11 11:36, Alberto Garcia wrote: > On Fri 11 Sep 2015 11:14:33 AM CEST, Fam Zheng wrote: > > >> > Another advantage for bdrv_aio_poll() is, in main loop we will not > >> > need a separate AioContext in changes like: > >> > > >> > http://patchwork.ozlabs.org/patch/514968/ > >> > > >> >

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Daniel P. Berrange
On Fri, Sep 11, 2015 at 11:36:10AM +0200, Alberto Garcia wrote: > On Fri 11 Sep 2015 11:14:33 AM CEST, Fam Zheng wrote: > > >> > Another advantage for bdrv_aio_poll() is, in main loop we will not > >> > need a separate AioContext in changes like: > >> > > >> > http://patchwork.ozlabs.org/patch/5

Re: [Qemu-devel] [Qemu-block] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-11 Thread Alberto Garcia
On Fri 11 Sep 2015 11:14:33 AM CEST, Fam Zheng wrote: >> > Another advantage for bdrv_aio_poll() is, in main loop we will not >> > need a separate AioContext in changes like: >> > >> > http://patchwork.ozlabs.org/patch/514968/ >> > >> > Because nested aio_poll will automatically be limited to o