On Thu, Dec 21, 2017 at 07:40:13PM +0800, Fam Zheng wrote: [...]
> > +/* > > + * Pop one QMP request from monitor queues, return NULL if not found. > > + * We are using round-robin fasion to pop the request, to avoid > > s/fasion/fashion/ Fixed. [...] > > static void monitor_qmp_read(void *opaque, const uint8_t *buf, int size) > > { > > Monitor *mon = opaque; > > @@ -4150,6 +4292,15 @@ static void monitor_iothread_init(void) > > { > > mon_global.mon_iothread = iothread_create("mon_iothread", > > &error_abort); > > + > > + /* > > + * This MUST be on main loop thread since we have commands that > > + * have assumption to be run on main loop thread (Yeah, we'd > > + * better remove this assumption in the future). > > Assert and move this comment in monitor_qmp_bh_dispatcher? I would still prefer to keep it here. IMHO what really matters is the first parameter that passed in to aio_bh_new() below, rather than monitor_qmp_bh_dispatcher itself? Thanks, > > > + */ > > + mon_global.qmp_dispatcher_bh = aio_bh_new(qemu_get_aio_context(), > > + monitor_qmp_bh_dispatcher, > > + NULL); > > } > > > > Fam -- Peter Xu