>On Thu, Jun 15, 2017 at 12:23:27PM +0800, Jason Wang wrote: >> Paolo, Marc and Stefan:
>> >> We want let chardev front-end run in colo comparing IOThread. This looks not >> supported by current chardev frontend API. Any idea/suggestion on how to >> achieve this? > >A follow-up: > >I just noticed that io/ supports AioContext. > >This means a different approach is to add AioContext support to the >chardev API so that either GMainContext or AioContext can be used. Hi Stefan, IOThread does not run a GMainContext, I think we can create a new GMainContext in the IOThread and attach IOThread's AioContext to the GMainContext , finally use g_main_loop_run to replace aio_poll in the iothread_run function. After that IOThread runs the GMainContext event loop,chardev and IOThread can work together. How about it? If feasible, I will try to submit a patch. Thanks > >Again, I'm not sure how feasible this is. > >Stefan 原始邮件 发件人: <stefa...@redhat.com> 收件人: <jasow...@redhat.com> 抄送人:王勇10170530 <zhang.zhanghaili...@huawei.com> <zhangchen.f...@cn.fujitsu.com> <lizhij...@cn.fujitsu.com> <qemu-devel@nongnu.org>王广10165992 <pbonz...@redhat.com> <marcandre.lur...@gmail.com> 日 期 :2017年06月16日 17:20 主 题 :Re: 答复: Re: 答复: Re: [PATCHv2 02/04] colo-compare: Processpactkets in the IOThread ofthe primary On Thu, Jun 15, 2017 at 12:23:27PM +0800, Jason Wang wrote: > Paolo, Marc and Stefan: > > We want let chardev front-end run in colo comparing IOThread. This looks not > supported by current chardev frontend API. Any idea/suggestion on how to > achieve this? A follow-up: I just noticed that io/ supports AioContext. This means a different approach is to add AioContext support to the chardev API so that either GMainContext or AioContext can be used. Again, I'm not sure how feasible this is. Stefan