Re: [Qemu-devel] [PATCHv5 02/03] colo-compare: Use IOThread to Check old packet regularly and Process pactkets of the primary

2017-09-05 Thread wang.yong155
>Remove the task which check old packet in the comparing thread, >then use IOthread context timer to handle it. > >Process pactkets in the IOThread which arrived over the socket. >we use iothread_get_g_main_context to create a new g_main_loop in >the IOThread.then the packets from the primary

Re: [Qemu-devel] [PATCHv5 01/03] qemu-iothread: IOThread supports theGMainContext event loop

2017-09-04 Thread wang.yong155
>> IOThread uses AioContext event loop and does not run a GMainContext. >> Therefore,chardev cannot work in IOThread,such as the chardev is >> used for colo-compare packets reception. >> >> This patch makes the IOThread run the GMainContext event loop, >> chardev and IOThread can work

Re: [Qemu-devel] [PATCHv5 01/03] qemu-iothread: IOThread supports theGMainContext event loop

2017-08-30 Thread wang.yong155
>> From: Wang Yong >> >> IOThread uses AioContext event loop and does not run a GMainContext. >> Therefore,chardev cannot work in IOThread,such as the chardev is >> used for colo-compare packets reception. >> >> This patch makes the IOThread run the GMainContext

Re: [Qemu-devel] [PATCHv5 01/03] qemu-iothread: IOThread supports theGMainContext event loop

2017-08-30 Thread wang.yong155
>> From: Wang Yong >> >> IOThread uses AioContext >> event loop and does not run a GMainContext.>> Therefore,chardev cannot work >> in IOThread,such as the chardev is>> used for colo-compare packets >> reception.>> >> This patch makes the IOThread run the GMainContext

Re: [Qemu-devel] [PATCHv4 01/03] qemu-iothread: IOThread supports theGMainContext event loop

2017-08-28 Thread wang.yong155
>Hi Wang Yong,>>To make the discussion easier, please try to fix your email >client to:>>1) set In-Reply-To: header when replying>2) use plain text instead >of html>3) use monospace fonts to view and compose a reply>4) avoid attaching >the original email in the end, just reply inline>5) maybe,

[Qemu-devel] 答复: Re: [PATCHv4 02/03] colo-compare: Use IOThread to Check old packetregularly and Process pactkets of the primary

2017-08-27 Thread wang.yong155
>> static char *compare_get_pri_indev(Object *obj, Error **errp)>> @@ -759,12 >> +764,10 @@ static void colo_compare_complete(UserCreatable *uc, Error >> **errp)>> {>> CompareState *s = COLO_COMPARE(uc)>> Chardev >> *chr>> -char thread_name[64]>> -static int compare_id>>

[Qemu-devel] 答复: Re: [PATCHv4 01/03] qemu-iothread: IOThread supports theGMainContext event loop

2017-08-23 Thread wang.yong155
>> diff --git a/iothread.c b/iothread.c>> index beeb870..fb1c55b 100644>> --- >> a/iothread.c>> +++ b/iothread.c>> @@ -57,6 +57,20 @@ static void >> *iothread_run(void *opaque)>> >> while >> (!atomic_read(>stopping)) {>> aio_poll(iothread->ctx, >> true)>> +>> +if

[Qemu-devel] 答复: Re: [PATCHv3 00/03] Replace the COLO comparing thread with IOThread

2017-08-21 Thread wang.yong155
>Hi~ Wang Yong. >>I have rebased this series to colo-for-qemu-2.10-2017-4-22 >>>,>>But >>with this patch set COLO can't start normally, something I missed?>>Can you >>give me a github branch based on colo-for-qemu-2.10-2017-4-22

[Qemu-devel] 答复: Re: [PATCHv3 01/03] qemu-iothread: IOThread supports the GMainContextevent loop

2017-08-20 Thread wang.yong155
>> +static gpointer iothread_g_main_context_init(gpointer opaque)>> +{>> + >> AioContext *ctx>> +IOThread *iothread = opaque>> +GSource *source>> >> +>> +iothread->worker_context = g_main_context_new()>> +>> +ctx = >> iothread_get_aio_context(iothread)>> +source =

[Qemu-devel] 答复: Re: [PATCHv3 00/02] Replace the COLO comparing thread with IOThread

2017-08-16 Thread wang.yong155
>> From: Wang Yong >> >> Note: This series is based on >> the patch of "qemu-iothread: >> IOThread supports theGMainContext event >> loop".>The syntax for patchew to pick up the dependency automatically: >Based-on:

[Qemu-devel] 答复: Re: [PATCH] qemu-iothread: IOThread supports the GMainContext eventloop

2017-08-10 Thread wang.yong155
>Nice. Just a note, I think an iothread should have its own (optional) >GMainContext accessed with iothread_get_g_main_context(iothread). When >you call it for the first time, the iothread: > >1) creates a GMainContext > >2) adds the AioContext as a GSource in the GMainContext > >3) asks

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Processpactkets inthe IOThreadofthe primary

2017-08-01 Thread wang.yong155
>On Tue, 08/01 12:25, Paolo Bonzini wrote: >> On 28/07/2017 02:25, Fam Zheng wrote: >> > On Thu, 07/27 15:47, Zhang Chen wrote: >> >> CC. Fam and David. >> >> >> >> Any idea about it? >> > >> > Is it possible to use g_main_context_{push,pop}_thread_default to "move" >> > chardev >> >

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Processpactkets in the IOThreadofthe primary

2017-07-24 Thread wang.yong155
>On 24/07/2017 12:38, wang.yong...@zte.com.cn wrote: >> finally use g_main_loop_run to replace aio_poll in the >> iothread_run function. > >That would make the performance of virtio-blk with iothreads worse, >unfortunately. aio_poll is much more optimized than g_main_loop_run. Hi Paolo,

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Processpactkets in the IOThread ofthe primary

2017-07-24 Thread wang.yong155
>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

[Qemu-devel] 答复: Re: 答复: Re: [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread ofthe primary

2017-06-13 Thread wang.yong155
>>Char-fe.c for sure which means frontend of chardev. >>> These API can only watch events in the qemu main thread, not in the >>> IOThread. >>> >>> I had to use the qio_channel_socket_set_aio_fd_handler function to >>> >>> monitor the char event in the IOThread,so the io channel is

[Qemu-devel] 答复: Re: 答复: Re: [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread ofthe primary

2017-06-12 Thread wang.yong155
>> >> From: Wang Yong <wang.yong...@zte.com.cn> >> >> >> >> >> >> Process pactkets in the IOThread which arrived over the socket. >> >> >> we use qio_channel_set_aio_fd_handler to set the handlers on the >> >> >> IOThread AioContext.then the packets from the primary and the >> secondary

[Qemu-devel] 答复: Re: [PATCHv2 04/04] colo-compare: Update the COLO document to fix theprocessing of secondary packets in the main thread

2017-06-08 Thread wang.yong155
>> From: Wang Yong <wang.yong...@zte.com.cn> >> >> In my test, secondary does not process the packets comparing in the IOThread >> but in the qemu main thread processing. >> secondary's configuration " -chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait" >> here,we should use

[Qemu-devel] 答复: Re: [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread ofthe primary

2017-06-08 Thread wang.yong155
>> From: Wang Yong <wang.yong...@zte.com.cn> >> >> Process pactkets in the IOThread which arrived over the socket. >> we use qio_channel_set_aio_fd_handler to set the handlers on the >> IOThread AioContext.then the packets from the primary and the secondary >> are processed in the IOThread.

[Qemu-devel] 答复: Re: [PATCHv2 01/04] colo-compare: Use IOThread context timer to Checkold packet regularly

2017-06-08 Thread wang.yong155
>> From: Wang Yong<wang.yong...@zte.com.cn> >> >> Remove the task which check old packet in the comparing thread, >> then use IOthread context timer to handle it. >> >> Signed-off-by: Wang Yong<wang.yong...@zte.com.cn> >> Signed-off-by: Wang Guang<wang.guan...@zte.com.cn> >> --- >>