Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-15 Thread Stefan Hajnoczi
On Sun, Jul 07, 2013 at 06:00:17PM +0800, Liu Ping Fan wrote: @@ -211,6 +238,7 @@ AioContext *aio_context_new(void) ctx = (AioContext *) g_source_new(aio_source_funcs, sizeof(AioContext)); ctx-pollfds = g_array_new(FALSE, FALSE, sizeof(GPollFD)); ctx-thread_pool = NULL; +

[Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-07 Thread Liu Ping Fan
From: Liu Ping Fan qemul...@gmail.com BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not take this extra lock. Note that for the same AioContext, aio_bh_poll() can not run in

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-07 Thread Andreas Färber
Am 07.07.2013 12:00, schrieb Liu Ping Fan: From: Liu Ping Fan qemul...@gmail.com BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not take this extra lock. Note that for

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-07 Thread liu ping fan
On Sun, Jul 7, 2013 at 8:31 PM, Andreas Färber afaer...@suse.de wrote: Am 07.07.2013 12:00, schrieb Liu Ping Fan: From: Liu Ping Fan qemul...@gmail.com BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-05 Thread Stefan Hajnoczi
On Wed, Jun 26, 2013 at 05:46:11PM +0800, liu ping fan wrote: On Tue, Jun 25, 2013 at 5:40 PM, Kevin Wolf kw...@redhat.com wrote: Am 25.06.2013 um 19:26 hat Liu Ping Fan geschrieben: BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-07-05 Thread Paolo Bonzini
Il 05/07/2013 15:46, Stefan Hajnoczi ha scritto: On Wed, Jun 26, 2013 at 05:46:11PM +0800, liu ping fan wrote: On Tue, Jun 25, 2013 at 5:40 PM, Kevin Wolf kw...@redhat.com wrote: Am 25.06.2013 um 19:26 hat Liu Ping Fan geschrieben: BH will be used outside big lock, so introduce lock to protect

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-06-26 Thread liu ping fan
On Tue, Jun 25, 2013 at 5:40 PM, Kevin Wolf kw...@redhat.com wrote: Am 25.06.2013 um 19:26 hat Liu Ping Fan geschrieben: BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-06-25 Thread Stefan Hajnoczi
On Wed, Jun 26, 2013 at 01:26:25AM +0800, Liu Ping Fan wrote: BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not take this extra lock. Note that for the same AioContext,

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-06-25 Thread Kevin Wolf
Am 25.06.2013 um 19:26 hat Liu Ping Fan geschrieben: BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not take this extra lock. Note that for the same AioContext,

Re: [Qemu-devel] [PATCH v5] QEMUBH: make AioContext's bh re-entrant

2013-06-25 Thread Paolo Bonzini
Il 25/06/2013 11:40, Kevin Wolf ha scritto: Am 25.06.2013 um 19:26 hat Liu Ping Fan geschrieben: BH will be used outside big lock, so introduce lock to protect between the writers, ie, bh's adders and deleter. The lock only affects the writers and bh's callback does not take this extra lock.