qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Jason Wang <jasowang@redhat.com>, zhangchen.fnst@cn.fujitsu.com
Cc: xuquan8@huawei.com, qemu-devel@nongnu.org, lizhijian@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage
Date: Tue, 14 Feb 2017 15:33:41 +0800	[thread overview]
Message-ID: <58A2B2D5.4060902@huawei.com> (raw)
In-Reply-To: <3b158bac-a92d-be3d-88a9-8c23a0d065dd@redhat.com>

On 2017/2/14 12:08, Jason Wang wrote:
>
>
> On 2017年02月14日 10:32, Hailiang Zhang wrote:
>>>>
>>>
>>
>> Hi Jason,
>>
>>> I think the better way is notify the comparing thread and let it do the
>>> releasing. You probably need similar mechanism to notify from comparing
>>> thread to checkpoint thread.
>>>
>>
>> It seems that there is no available APIs in glib to notify a thread which
>> are run coroutine to do something (idle source ?). What about using
>> anonymous pipe
>> as the GPollFD to communicate between colo comparing thread and colo
>> thread ?
>>
>> Any ideas ?
>>
>> Hailiang
>
> Haven't thought this deeply. But I think you can try event notifier
> first which was designed for such kind of notification.
>

Hmm, It is quite same with what i said above except it uses the
return value of eventfd as the GPollFD.
The things here are more complex especially if there are more than
one vNIC, which each is corresponding to one compare thread.

How about using g_source_attach(), g_source_attach(), g_source_remove(),
g_source_set_callback() and g_source_set_priority() to control the process
of releasing packets dynamically ? Which we call g_source_attach()
to add the coroutine of releasing packets when do checkpoint, and remove
it once finishing the checkpoint process.

About colo comparing thread notifies colo thread, i think we can use
qemu_cond_wait(),qemu_cond_broadcast(), just like what we do in
pause_all_vcpus().

Thanks.
Hailiang

> Thanks
>
> .
>

  reply	other threads:[~2017-02-14  7:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 14:05 [Qemu-devel] [PATCH 0/3] colo-compare: Preparing work for combining with COLO frame zhanghailiang
2017-01-24 14:05 ` [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage zhanghailiang
2017-02-03  3:47   ` Jason Wang
2017-02-06  8:13     ` Hailiang Zhang
2017-02-06  8:30       ` Zhang Chen
2017-02-06  9:35       ` Jason Wang
2017-02-06 11:11         ` Hailiang Zhang
2017-02-06 12:53           ` Jason Wang
2017-02-07  7:54             ` Hailiang Zhang
2017-02-07  7:57               ` Jason Wang
2017-02-07  8:19                 ` Hailiang Zhang
2017-02-07  9:21                   ` Jason Wang
2017-02-07  9:30                     ` Hailiang Zhang
2017-02-14  2:32                     ` Hailiang Zhang
2017-02-14  4:08                       ` Jason Wang
2017-02-14  7:33                         ` Hailiang Zhang [this message]
2017-02-15  3:16                           ` Jason Wang
2017-01-24 14:05 ` [Qemu-devel] [PATCH 2/3] colo-compare: add API to flush all queued packets while do checkpoint zhanghailiang
2017-01-24 14:05 ` [Qemu-devel] [PATCH 3/3] colo-compare: use notifier to notify inconsistent packets comparing zhanghailiang
2017-02-03  4:50   ` Jason Wang
2017-02-06  8:44     ` Hailiang Zhang
2017-02-06  9:35       ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58A2B2D5.4060902@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xuquan8@huawei.com \
    --cc=zhangchen.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).