Re: [Qemu-devel] [PATCH 2/4] iothread: create the gcontext onconditionally

2019-02-21 Thread Peter Xu
On Fri, Feb 22, 2019 at 07:29:09AM +0100, Marc-André Lureau wrote: [...] > > diff --git a/iothread.c b/iothread.c > > index 6e297e9ef1..6fa87876e0 100644 > > --- a/iothread.c > > +++ b/iothread.c > > @@ -65,7 +65,7 @@ static void *iothread_run(void *opaque) > > * We must check the runni

Re: [Qemu-devel] [PATCH 2/4] iothread: create the gcontext onconditionally

2019-02-21 Thread Marc-André Lureau
Hi On Fri, Feb 22, 2019 at 4:14 AM Peter Xu wrote: > > In existing code we create the gcontext dynamically at the first > access of the gcontext from caller. That can bring some complexity > and potential races during using iothread. Since the context itself > is not that big a resource, and we

[Qemu-devel] [PATCH 2/4] iothread: create the gcontext onconditionally

2019-02-21 Thread Peter Xu
In existing code we create the gcontext dynamically at the first access of the gcontext from caller. That can bring some complexity and potential races during using iothread. Since the context itself is not that big a resource, and we won't have millions of iothread, let's simply create the gcont