From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dr. David Alan Gilbert" Subject: Re: [PATCH RFC] migration: make sure to run iterate precopy during the bulk stage Date: Tue, 4 Sep 2018 10:09:28 +0100 Message-ID: <20180904090928.GA2529@work-vm> References: <5ab76c3e-9310-0e08-2f1b-4ff52bf229f8@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: qemu-devel@nongnu.org, kvm , quintela@redhat.com To: Quan Xu Return-path: Content-Disposition: inline In-Reply-To: <5ab76c3e-9310-0e08-2f1b-4ff52bf229f8@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org * Quan Xu (quan.xu0@gmail.com) wrote: > From 8dbf7370e7ea1caab0b769d0d4dcdd072d14d421 Mon Sep 17 00:00:00 2001 > From: Quan Xu > Date: Wed, 29 Aug 2018 21:33:14 +0800 > Subject: [PATCH RFC] migration: make sure to run iterate precopy during= the > =A0bulk stage >=20 > Since the bulk stage assumes in (migration_bitmap_find_dirty) that ever= y > page is dirty, return a rough total ram as pending size to make sure th= at > migration thread continues to run iterate precopy during the bulk stage= . >=20 > Otherwise the downtime grows unpredictably, as migration thread needs t= o > send both the rest of pages and dirty pages during complete precopy. >=20 > Signed-off-by: Quan Xu Hi, Can you explain a bit more about the problem you're seeing? I think you're saying it's exiting the iteration near the end of the bulk stage, before it's done the first sync? > --- > =A0migration/ram.c | 3 ++- > =A01 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/migration/ram.c b/migration/ram.c > index 79c8942..cfa304c 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -3308,7 +3308,8 @@ static void ram_save_pending(QEMUFile *f, void > *opaque, uint64_t max_size, > =A0=A0=A0=A0=A0=A0=A0=A0 /* We can do postcopy, and all the data is pos= tcopiable */ > =A0=A0=A0=A0=A0=A0=A0=A0 *res_compatible +=3D remaining_size; > =A0=A0=A0=A0 } else { > -=A0=A0=A0=A0=A0=A0=A0 *res_precopy_only +=3D remaining_size; > +=A0=A0=A0=A0=A0=A0=A0 *res_precopy_only +=3D (rs->ram_bulk_stage ? > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 ram_bytes_total() : remaining_size); So that's assuming that the whole of RAM is dirty, even if we're near the end of the bulk stage? Dave > =A0=A0=A0=A0 } > =A0} >=20 > -- > 1.8.3.1 >=20 >=20 >=20 -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK