Re: [Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-27 Thread Stefan Hajnoczi
On Fri, Feb 22, 2019 at 11:14:10AM +0800, Peter Xu wrote: > Only sending an init-done message using lock+cond seems an overkill to > me. Replacing it with a simpler semaphore. > > Meanwhile, init the semaphore unconditionally, then we can destroy it > unconditionally too in finalize which seems c

Re: [Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-22 Thread Marc-André Lureau
Hi On Fri, Feb 22, 2019 at 10:33 AM Paolo Bonzini wrote: > > On 22/02/19 07:36, Peter Xu wrote: > > On Fri, Feb 22, 2019 at 07:25:16AM +0100, Marc-André Lureau wrote: > >> Hi > >> > >> On Fri, Feb 22, 2019 at 4:14 AM Peter Xu wrote: > >>> > >>> Only sending an init-done message using lock+cond s

Re: [Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-22 Thread Paolo Bonzini
On 22/02/19 07:36, Peter Xu wrote: > On Fri, Feb 22, 2019 at 07:25:16AM +0100, Marc-André Lureau wrote: >> Hi >> >> On Fri, Feb 22, 2019 at 4:14 AM Peter Xu wrote: >>> >>> Only sending an init-done message using lock+cond seems an overkill to >>> me. Replacing it with a simpler semaphore. >>> >>>

Re: [Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-21 Thread Peter Xu
On Fri, Feb 22, 2019 at 07:25:16AM +0100, Marc-André Lureau wrote: > Hi > > On Fri, Feb 22, 2019 at 4:14 AM Peter Xu wrote: > > > > Only sending an init-done message using lock+cond seems an overkill to > > me. Replacing it with a simpler semaphore. > > > > Meanwhile, init the semaphore uncondit

Re: [Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-21 Thread Marc-André Lureau
Hi On Fri, Feb 22, 2019 at 4:14 AM Peter Xu wrote: > > Only sending an init-done message using lock+cond seems an overkill to > me. Replacing it with a simpler semaphore. > > Meanwhile, init the semaphore unconditionally, then we can destroy it > unconditionally too in finalize which seems clean

[Qemu-devel] [PATCH 1/4] iothread: replace init_done_cond with a semaphore

2019-02-21 Thread Peter Xu
Only sending an init-done message using lock+cond seems an overkill to me. Replacing it with a simpler semaphore. Meanwhile, init the semaphore unconditionally, then we can destroy it unconditionally too in finalize which seems cleaner. Signed-off-by: Peter Xu --- include/sysemu/iothread.h |