[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread |
Date: |
Wed, 11 Apr 2018 17:48:12 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Wed, Apr 11, 2018 at 11:38:58AM +0200, Paolo Bonzini wrote:
> On 11/04/2018 11:35, Peter Xu wrote:
> > Yeah, the inheritance will only make sure cur_mon be initialized
> > always with correct value just like when we are without Out-Of-Band.
> > For example, it's still possible a thread is created within a QMP
> > handler. If without current change, the cur_mon in the new thread
> > would be NULL.
> >
> > AFAIU even if cur_mon==NULL we should mostly be fine (e.g.,
> > error_vprintf will handle that case well). If any of you can help me
> > confirm this, then I agree that this patch is not really needed.
>
> Yes, though the solution is to not use error_vprintf from auxiliary
> threads. :) Just make sure all the communication happens through a
> struct that's passed in the thread entry point, and possibly bottom
> halves from the auxiliary thread to the monitor iothread.
Okay. :) Thanks for confirming. Then let me repost this patch without
touching the qemu-threads.
Btw, do you want me to repost the first patch separately too, or keep
the code as is? I believe it depends on whether you treat that one as
a cleanup or not. Thanks,
--
Peter Xu
- Re: [Qemu-devel] [PATCH 1/2] qemu-thread: always keep the posix wrapper layer, (continued)
- [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Eric Blake, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Stefan Hajnoczi, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Paolo Bonzini, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Paolo Bonzini, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread,
Peter Xu <=
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Eric Blake, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/12