[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread cre
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation |
Date: |
Tue, 25 Sep 2018 18:31:08 +0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Tue, Sep 25, 2018 at 10:15:07AM +0200, Wolfgang Bumiller wrote:
> Commit d32749deb615 moved the call to monitor_init_globals()
> to before os_daemonize(), making it an unsuitable place to
> spawn the monitor iothread as it won't be inherited over the
> fork() in os_daemonize().
>
> We now spawn the thread the first time we instantiate a
> monitor which actually has use_io_thread == true.
> Instantiation of monitors happens only after os_daemonize().
> We still need to create the qmp_dispatcher_bh when not using
> iothreads, so this now still happens in
> monitor_init_globals().
>
> Signed-off-by: Wolfgang Bumiller <address@hidden>
> Fixes: d32749deb615 ("monitor: move init global earlier")
Reviewed-by: Peter Xu <address@hidden>
Tested-by: Peter Xu <address@hidden>
Though note that after this patch monitor_data_init() is not thread
safe any more (while it was), so we may need to be careful...
Thanks,
--
Peter Xu
- [Qemu-devel] [PATCH rebased 0/2] delay monitor iothread creation, Wolfgang Bumiller, 2018/09/25
- [Qemu-devel] [PATCH rebased 1/2] monitor: guard iothread access by mon->use_io_thread, Wolfgang Bumiller, 2018/09/25
- [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Wolfgang Bumiller, 2018/09/25
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation,
Peter Xu <=
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Wolfgang Bumiller, 2018/09/25
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Peter Xu, 2018/09/25
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Markus Armbruster, 2018/09/27
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Peter Xu, 2018/09/27
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Markus Armbruster, 2018/09/27
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Peter Xu, 2018/09/27
- Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation, Wolfgang Bumiller, 2018/09/28