From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzdpt-0002S5-S0 for qemu-devel@nongnu.org; Thu, 27 Oct 2016 02:06:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzdpq-0007bs-KY for qemu-devel@nongnu.org; Thu, 27 Oct 2016 02:06:45 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:30936) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzdpq-000783-1m for qemu-devel@nongnu.org; Thu, 27 Oct 2016 02:06:42 -0400 References: <1476792613-11712-1-git-send-email-zhang.zhanghailiang@huawei.com> <1476792613-11712-6-git-send-email-zhang.zhanghailiang@huawei.com> <20161026050631.GE1679@amit-lp.rh> <5810B822.9030202@huawei.com> <20161027035700.GC1476@amit-lp.rh> From: Hailiang Zhang Message-ID: <5811994D.2000605@huawei.com> Date: Thu, 27 Oct 2016 14:06:05 +0800 MIME-Version: 1.0 In-Reply-To: <20161027035700.GC1476@amit-lp.rh> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 05/17] COLO: Establish a new communicating path for COLO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, wency@cn.fujitsu.com, lizhijian@cn.fujitsu.com, xiecl.fnst@cn.fujitsu.com On 2016/10/27 11:57, Amit Shah wrote: > On (Wed) 26 Oct 2016 [22:05:22], Hailiang Zhang wrote: >> On 2016/10/26 13:06, Amit Shah wrote: >>> On (Tue) 18 Oct 2016 [20:10:01], zhanghailiang wrote: >>>> This new communication path will be used for returning messages >>> >from Secondary side to Primary side. >>>> >>>> Signed-off-by: zhanghailiang >>>> Signed-off-by: Li Zhijian >>>> Reviewed-by: Dr. David Alan Gilbert >>> >>> Reviewed-by: Amit Shah >>> >>>> @@ -63,8 +75,24 @@ void *colo_process_incoming_thread(void *opaque) >>>> migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE, >>>> MIGRATION_STATUS_COLO); >>>> >>>> + mis->to_src_file = qemu_file_get_return_path(mis->from_src_file); >>>> + if (!mis->to_src_file) { >>>> + error_report("COLO incoming thread: Open QEMUFile to_src_file failed"); >>>> + goto out; >>>> + } >>>> + /* >>>> + * Note: We set the fd to unblocked in migration incoming coroutine, >>>> + * But here we are in the COLO incoming thread, so it is ok to set the >>>> + * fd back to blocked. >>>> + */ >>>> + qemu_file_set_blocking(mis->from_src_file, true); >>> >>> Why does it need to be blocking? >>> >> >> Because, the communication/action between Primary side and Secondary side should be >> sequential. Just as postcopy does. :) > > Yea - I mean please include that in the comment too so it's obvious > why it's done. > OK, i will add this in next version, thanks. > > Amit > > . >