From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvlja-00015x-JF for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvljX-0007xi-DS for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:39:42 -0500 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:51780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvljW-0007xU-LD for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:39:39 -0500 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 18:09:34 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id CDB97E0061 for ; Mon, 9 Nov 2015 18:09:51 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay04.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tA9CdTQ830343226 for ; Mon, 9 Nov 2015 18:09:30 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tA9CdTQi028504 for ; Mon, 9 Nov 2015 18:09:29 +0530 Date: Mon, 9 Nov 2015 18:09:26 +0530 From: Bharata B Rao Message-ID: <20151109123925.GE14232@in.ibm.com> References: <20151106090952.GA2459@work-vm> <20151106122222.GF2459@work-vm> <20151106134341.GG2459@work-vm> <20151106153314.GA14232@in.ibm.com> <20151106154810.GC4267@work-vm> <20151109032116.GB14232@in.ibm.com> <20151109090832.GA2513@work-vm> <20151109102843.GC14232@in.ibm.com> <20151109110302.GB2513@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109110302.GB2513@work-vm> Subject: Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, liang.z.li@intel.com, "qemu-devel@nongnu.org" , luis@cs.umu.se, "amit.shah@redhat.com" , Paolo Bonzini , David Gibson On Mon, Nov 09, 2015 at 11:03:02AM +0000, Dr. David Alan Gilbert wrote: > > > Oh, I think I see it; the following is untested, I'll grab a machine to > try it on but it will take a little while: > > diff --git a/migration/ram.c b/migration/ram.c > index 62cf42b..e6db965 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -2273,6 +2274,7 @@ static int ram_load_postcopy(QEMUFile *f) > /* Temporary page that is later 'placed' */ > void *postcopy_host_page = postcopy_get_tmp_page(mis); > void *last_host = NULL; > + bool all_zero = false; > > while (!ret && !(flags & RAM_SAVE_FLAG_EOS)) { > ram_addr_t addr; > @@ -2280,7 +2282,6 @@ static int ram_load_postcopy(QEMUFile *f) > void *page_buffer = NULL; > void *place_source = NULL; > uint8_t ch; > - bool all_zero = false; > > addr = qemu_get_be64(f); > flags = addr & ~TARGET_PAGE_MASK; So with the above fix on top of the previous one you sent, I am able to do back and forth postcopy migration of pseries guest within the same host while switching to postcopy mode immediately after starting the migration. And btw I can see lots of hits to postcopy_place_page_zero now! Regards, Bharata.