From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvlwB-0006om-9A for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:52:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zvlw8-00033N-44 for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:52:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvlw7-000339-Uv for qemu-devel@nongnu.org; Mon, 09 Nov 2015 07:52:40 -0500 Date: Mon, 9 Nov 2015 12:52:34 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20151109125234.GC2513@work-vm> References: <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> <20151109123925.GE14232@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109123925.GE14232@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao 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 * Bharata B Rao (bharata@linux.vnet.ibm.com) wrote: > 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! Excellent! Thanks for finding that; that misplaced line has been in there for about a year :-) Dave > > Regards, > Bharata. > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK