From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>,
qemu devel <qemu-devel@nongnu.org>,
Li Zhijian <lizhijian@cn.fujitsu.com>,
Gui jianfeng <guijianfeng@cn.fujitsu.com>,
Wen Congyang <wency@cn.fujitsu.com>,
zhanghailiang <zhang.zhanghailiang@huawei.com>,
Yang Hongyang <hongyang.yang@easystack.cn>,
"eddie.dong" <eddie.dong@intel.com>
Subject: Re: [Qemu-devel] [RFC PATCH V3 3/4] colo-compare: introduce packet comparison thread
Date: Fri, 29 Apr 2016 12:20:59 +0100 [thread overview]
Message-ID: <20160429112058.GI10788@work-vm> (raw)
In-Reply-To: <57231B40.2040605@cn.fujitsu.com>
* Zhang Chen (zhangchen.fnst@cn.fujitsu.com) wrote:
>
>
> On 04/29/2016 10:07 AM, Jason Wang wrote:
> >
> >On 04/28/2016 06:31 PM, Zhang Chen wrote:
> >>>>+/*
> >>>>+ * called from the compare thread on the primary
> >>>>+ * for compare connection
> >>>>+ */
> >>>>+static void colo_compare_connection(void *opaque, void *user_data)
> >>>>+{
> >>>>+ Connection *conn = opaque;
> >>>>+ Packet *pkt = NULL;
> >>>>+ GList *result = NULL;
> >>>>+ int ret;
> >>>>+
> >>>>+ qemu_mutex_lock(&conn->list_lock);
> >>>>+ while (!g_queue_is_empty(&conn->primary_list) &&
> >>>>+ !g_queue_is_empty(&conn->secondary_list)) {
> >>>>+ pkt = g_queue_pop_head(&conn->primary_list);
> >>>>+ result = g_queue_find_custom(&conn->secondary_list,
> >>>>+ pkt,
> >>>>(GCompareFunc)colo_packet_compare_all);
> >>>>+
> >>>>+ if (result) {
> >>>>+ ret = compare_chr_send(pkt->s->chr_out, pkt->data,
> >>>>pkt->size);
> >>>>+ if (ret < 0) {
> >>>>+ error_report("colo_send_primary_packet failed");
> >>>>+ }
> >>>>+ trace_colo_compare_main("packet same and release packet");
> >>>>+ g_queue_remove(&conn->secondary_list, result->data);
> >>>>+ } else {
> >>>>+ trace_colo_compare_main("packet different");
> >>>>+ g_queue_push_head(&conn->primary_list, pkt);
> >>>Is this possible that the packet from secondary has not been arrived on
> >>>time? If yes, do we still need to notify the checkpoint here?
> >>Yes,the packet of secondary may not arrived.
> >>we will hold primary packet to next periodic checkpoint
> >>to flush it. and more, I consider to set a timer
> >>to flush timeout(200ms???) packet like Dave's branch.
> >>
> >>
> >>Thanks
> >>zhangchen
> >I was wondering maybe you can merge or unify all other changes from
> >Dave's branch?
> >
>
> Yes, I will unify some codes from Dave's colo-proxy branch.
Of course always check what I've written; some of that branch
was quite hacky itself so don't just assume it's good!
Dave
>
> Thanks
> Zhang Chen
>
> >.
> >
>
> --
> Thanks
> zhangchen
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-04-29 11:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 11:11 [Qemu-devel] [RFC PATCH V3 0/4] Introduce COLO-compare Zhang Chen
2016-04-18 11:11 ` [Qemu-devel] [RFC PATCH V3 1/4] colo-compare: introduce colo compare initlization Zhang Chen
2016-04-28 6:53 ` Jason Wang
2016-04-28 7:16 ` Jason Wang
2016-04-28 7:55 ` Zhang Chen
2016-04-28 8:17 ` Jason Wang
2016-04-28 9:04 ` Zhang Chen
2016-04-29 2:03 ` Jason Wang
2016-04-29 2:08 ` Zhang Chen
2016-05-06 5:42 ` Zhang Chen
2016-05-06 6:37 ` Jason Wang
2016-05-09 10:49 ` Zhang Chen
2016-05-12 6:49 ` Zhang Chen
2016-05-12 8:01 ` Jason Wang
2016-05-12 8:16 ` Zhang Chen
2016-05-13 3:48 ` Jason Wang
2016-05-20 2:46 ` Jason Wang
2016-05-20 6:52 ` Fam Zheng
2016-04-28 7:53 ` Zhang Chen
2016-04-28 8:23 ` Jason Wang
2016-04-28 20:55 ` Eric Blake
2016-04-29 1:28 ` Zhang Chen
2016-04-18 11:11 ` [Qemu-devel] [RFC PATCH V3 2/4] colo-compare: track connection and enqueue packet Zhang Chen
2016-04-28 7:47 ` Jason Wang
2016-04-28 10:25 ` Zhang Chen
2016-04-29 2:05 ` Jason Wang
2016-04-29 7:24 ` Zhang Chen
2016-04-18 11:11 ` [Qemu-devel] [RFC PATCH V3 3/4] colo-compare: introduce packet comparison thread Zhang Chen
2016-04-28 7:58 ` Jason Wang
2016-04-28 10:31 ` Zhang Chen
2016-04-29 2:07 ` Jason Wang
2016-04-29 8:28 ` Zhang Chen
2016-04-29 11:20 ` Dr. David Alan Gilbert [this message]
2016-04-18 11:11 ` [Qemu-devel] [RFC PATCH V3 4/4] colo-compare: add TCP, UDP, ICMP packet comparison Zhang Chen
2016-04-28 8:15 ` Jason Wang
2016-04-28 19:44 ` Dr. David Alan Gilbert
2016-05-05 3:03 ` Zhang Chen
2016-05-05 3:10 ` Zhang Chen
2016-04-27 11:54 ` [Qemu-devel] [RFC PATCH V3 0/4] Introduce COLO-compare Zhang Chen
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=20160429112058.GI10788@work-vm \
--to=dgilbert@redhat.com \
--cc=eddie.dong@intel.com \
--cc=guijianfeng@cn.fujitsu.com \
--cc=hongyang.yang@easystack.cn \
--cc=jasowang@redhat.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=wency@cn.fujitsu.com \
--cc=zhang.zhanghailiang@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).