From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbRdA-00010O-8O for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:36:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbRd9-0000mU-66 for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:36:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbRd8-0000mQ-T4 for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:36:47 -0400 From: Juan Quintela In-Reply-To: <55152B4E.4050705@cn.fujitsu.com> (Wen Congyang's message of "Fri, 27 Mar 2015 18:05:02 +0800") References: <55128084.2040304@huawei.com> <87a8z12yot.fsf@neno.neno> <5513793B.6020909@cn.fujitsu.com> <874mp8xd9k.fsf@neno.neno> <20150327085634.GB3304@stefanha-thinkpad.redhat.com> <55151F59.8020000@cn.fujitsu.com> <55152B4E.4050705@cn.fujitsu.com> Date: Fri, 27 Mar 2015 11:36:35 +0100 Message-ID: <87sicqvia4.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: Kevin Wolf , hangaohuai@huawei.com, zhanghailiang , Li Zhijian , Michael Tsirkin , Stefan Hajnoczi , qemu-devel , "Dr. David Alan Gilbert (git)" , "Gonglei (Arei)" , Stefan Hajnoczi , Amit Shah , "Huangpeng (Peter)" , David Gibson Wen Congyang wrote: > On 03/27/2015 05:57 PM, Stefan Hajnoczi wrote: >>>> You must use -drive cache=none if you want to use live migration. It >>>> should not directly affect memory during migration though. >>> >>> Otherwise, what will happen? If the user doesn't use cache=none, and >>> tries to use live migration, qemu doesn't output any message or trigger >>> an event to notify the user. >> >> There is a risk that the destination host sees an inconsistent view of >> the image file because the source was still accessing it towards the >> end of migration. > > Does the flag BDRV_O_NOFLUSH cause it? The biggest isue is reads. Target: reads 1st block of disk it enters page cache of target Source: reads and writes lots of blocks Migration happens. Target: rereads 1st block of disk, and gets stalled contents. No amount of fdatasync(), syncs() whatever on source will fix this problem. Later, Juan.