qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

monitor: Spell "I/O thread" consistently in comments

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-3-armbru@redhat.com>

+17 -17
+17 -17
monitor.c
··· 243 243 /* Let's add monitor global variables to this struct. */ 244 244 static struct { 245 245 IOThread *mon_iothread; 246 - /* Bottom half to dispatch the requests received from IO thread */ 246 + /* Bottom half to dispatch the requests received from I/O thread */ 247 247 QEMUBH *qmp_dispatcher_bh; 248 248 /* Bottom half to deliver the responses back to clients */ 249 249 QEMUBH *qmp_respond_bh; ··· 518 518 { 519 519 if (mon->use_io_thr) { 520 520 /* 521 - * If using IO thread, we need to queue the item so that IO 521 + * If using I/O thread, we need to queue the item so that I/O 522 522 * thread will do the rest for us. Take refcount so that 523 523 * caller won't free the data (which will be finally freed in 524 524 * responder thread). ··· 529 529 qemu_bh_schedule(mon_global.qmp_respond_bh); 530 530 } else { 531 531 /* 532 - * If not using monitor IO thread, then we are in main thread. 532 + * If not using monitor I/O thread, then we are in main thread. 533 533 * Do the emission right away. 534 534 */ 535 535 monitor_json_emitter_raw(mon, data); ··· 1269 1269 if (!mon->use_io_thr) { 1270 1270 /* 1271 1271 * Out-of-band only works with monitors that are 1272 - * running on dedicated IOThread. 1272 + * running on dedicated I/O thread. 1273 1273 */ 1274 1274 error_setg(errp, "This monitor does not support " 1275 1275 "out-of-band (OOB)"); ··· 4403 4403 4404 4404 if (monitor_is_qmp(mon)) { 4405 4405 /* 4406 - * Kick iothread to make sure this takes effect. It'll be 4406 + * Kick I/O thread to make sure this takes effect. It'll be 4407 4407 * evaluated again in prepare() of the watch object. 4408 4408 */ 4409 4409 aio_notify(iothread_get_aio_context(mon_global.mon_iothread)); ··· 4422 4422 if (atomic_dec_fetch(&mon->suspend_cnt) == 0) { 4423 4423 if (monitor_is_qmp(mon)) { 4424 4424 /* 4425 - * For QMP monitors that are running in IOThread, let's 4425 + * For QMP monitors that are running in I/O thread, let's 4426 4426 * kick the thread in case it's sleeping. 4427 4427 */ 4428 4428 if (mon->use_io_thr) { ··· 4446 4446 4447 4447 for (cap = 0; cap < QMP_CAPABILITY__MAX; cap++) { 4448 4448 if (!mon->use_io_thr && cap == QMP_CAPABILITY_OOB) { 4449 - /* Monitors that are not using IOThread won't support OOB */ 4449 + /* Monitors that are not using I/O thread won't support OOB */ 4450 4450 continue; 4451 4451 } 4452 4452 qlist_append_str(cap_list, QMPCapability_str(cap)); ··· 4587 4587 NULL); 4588 4588 4589 4589 /* 4590 - * Unlike the dispatcher BH, this must be run on the monitor IO 4591 - * thread, so that monitors that are using IO thread will make 4592 - * sure read/write operations are all done on the IO thread. 4590 + * Unlike the dispatcher BH, this must be run on the monitor I/O 4591 + * thread, so that monitors that are using I/O thread will make 4592 + * sure read/write operations are all done on the I/O thread. 4593 4593 */ 4594 4594 mon_global.qmp_respond_bh = aio_bh_new(monitor_get_aio_context(), 4595 4595 monitor_qmp_bh_responder, ··· 4661 4661 if (mon->use_io_thr) { 4662 4662 /* 4663 4663 * When use_io_thr is set, we use the global shared dedicated 4664 - * IO thread for this monitor to handle input/output. 4664 + * I/O thread for this monitor to handle input/output. 4665 4665 */ 4666 4666 context = monitor_get_io_context(); 4667 4667 /* We should have inited globals before reaching here. */ ··· 4718 4718 /* 4719 4719 * We can't call qemu_chr_fe_set_handlers() directly here 4720 4720 * since during the procedure the chardev will be active 4721 - * and running in monitor iothread, while we'll still do 4721 + * and running in monitor I/O thread, while we'll still do 4722 4722 * something before returning from it, which is a possible 4723 4723 * race too. To avoid that, we just create a BH to setup 4724 4724 * the handlers. ··· 4745 4745 Monitor *mon, *next; 4746 4746 4747 4747 /* 4748 - * We need to explicitly stop the iothread (but not destroy it), 4749 - * cleanup the monitor resources, then destroy the iothread since 4748 + * We need to explicitly stop the I/O thread (but not destroy it), 4749 + * cleanup the monitor resources, then destroy the I/O thread since 4750 4750 * we need to unregister from chardev below in 4751 4751 * monitor_data_destroy(), and chardev is not thread-safe yet 4752 4752 */ 4753 4753 iothread_stop(mon_global.mon_iothread); 4754 4754 4755 4755 /* 4756 - * After we have IOThread to send responses, it's possible that 4757 - * when we stop the IOThread there are still replies queued in the 4756 + * After we have I/O thread to send responses, it's possible that 4757 + * when we stop the I/O thread there are still replies queued in the 4758 4758 * responder queue. Flush all of them. Note that even after this 4759 4759 * flush it's still possible that out buffer is not flushed. 4760 4760 * It'll be done in below monitor_flush() as the last resort. ··· 4770 4770 } 4771 4771 qemu_mutex_unlock(&monitor_lock); 4772 4772 4773 - /* QEMUBHs needs to be deleted before destroying the IOThread. */ 4773 + /* QEMUBHs needs to be deleted before destroying the I/O thread */ 4774 4774 qemu_bh_delete(mon_global.qmp_dispatcher_bh); 4775 4775 mon_global.qmp_dispatcher_bh = NULL; 4776 4776 qemu_bh_delete(mon_global.qmp_respond_bh);