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

2013-06-16 Thread liu ping fan
On Sat, Jun 15, 2013 at 7:16 PM, Paolo Bonzini wrote: > Il 15/06/2013 04:43, liu ping fan ha scritto: >> On Sat, Jun 15, 2013 at 1:35 PM, Paolo Bonzini wrote: >>> Il 13/06/2013 22:55, Liu Ping Fan ha scritto: BH will be used outside big lock, so introduce lock to protect it. Note that t

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

2013-06-16 Thread liu ping fan
On Sat, Jun 15, 2013 at 11:44 PM, Paolo Bonzini wrote: > Il 15/06/2013 07:16, Paolo Bonzini ha scritto: >> ... I'm not sure that this works yet. I see two problems: >> ctx->walking_bh needs to be accessed atomic, and while you are doing the >> deletions somebody could come up and start a read. H

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

2013-06-15 Thread Paolo Bonzini
Il 15/06/2013 07:16, Paolo Bonzini ha scritto: > ... I'm not sure that this works yet. I see two problems: > ctx->walking_bh needs to be accessed atomic, and while you are doing the > deletions somebody could come up and start a read. Havoc. Hmm, are you just trying to protect aio_bh_poll from a

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

2013-06-15 Thread Paolo Bonzini
Il 15/06/2013 04:43, liu ping fan ha scritto: > On Sat, Jun 15, 2013 at 1:35 PM, Paolo Bonzini wrote: >> Il 13/06/2013 22:55, Liu Ping Fan ha scritto: >>> BH will be used outside big lock, so introduce lock to protect it. >>> Note that the lock only affects the writer and bh's callback does >>> no

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

2013-06-15 Thread liu ping fan
On Sat, Jun 15, 2013 at 1:35 PM, Paolo Bonzini wrote: > Il 13/06/2013 22:55, Liu Ping Fan ha scritto: >> BH will be used outside big lock, so introduce lock to protect it. >> Note that the lock only affects the writer and bh's callback does >> not take this extra lock. >> >> Signed-off-by: Liu Pin

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

2013-06-14 Thread Paolo Bonzini
Il 13/06/2013 22:55, Liu Ping Fan ha scritto: > BH will be used outside big lock, so introduce lock to protect it. > Note that the lock only affects the writer and bh's callback does > not take this extra lock. > > Signed-off-by: Liu Ping Fan > --- > async.c | 10 +- > includ