From nobody Wed Nov 5 14:44:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153555050507913.216540284600683; Wed, 29 Aug 2018 06:48:25 -0700 (PDT) Received: from localhost ([::1]:43222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fv0pX-000852-AD for importer@patchew.org; Wed, 29 Aug 2018 09:48:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fv0iV-0007tR-VQ for qemu-devel@nongnu.org; Wed, 29 Aug 2018 09:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fv0iR-0000E1-RI for qemu-devel@nongnu.org; Wed, 29 Aug 2018 09:41:03 -0400 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:39889) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fv0iR-0000BD-3q for qemu-devel@nongnu.org; Wed, 29 Aug 2018 09:40:59 -0400 Received: by mail-oi0-x242.google.com with SMTP id c190-v6so9158511oig.6 for ; Wed, 29 Aug 2018 06:40:57 -0700 (PDT) Received: from [30.43.105.7] ([47.89.83.49]) by smtp.gmail.com with ESMTPSA id w84-v6sm3250167oie.40.2018.08.29.06.40.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 06:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=3kGx/jhhRySX1xUrDiTrLHtc1yxiBqAblV73iS4pIgo=; b=GXyZW9YG0x8VTWn+jDi9KKlyCuCDJxCrbvk4i5UMyMSt80fHyQIeHHodxojdu1eKzC VRDBtfRbEgtsq9MhALDDDZ7l1x6QtasG/iTwT4KTcMIfG1l3pRecycS9jA+31XJqKt7v VgwIe3fE2heHkyLi9bssucO2Bnwrj0JfnrqzrtneZ5giES5Xrx0/2WW124IZPBFuSUwm B7EWMM9vxlcp9Mxg/svvKI6x9jAh6WV/JGl7Eh10IkkrA0OH1iCT+8euVufEZ0uezIiT 1ST7QinDhs/VSzNHZkvixqRnDaqbFQ0XiWbif2UYE+B6q+XGGxl2fIAFUgcX7Sd5/kLE CPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=3kGx/jhhRySX1xUrDiTrLHtc1yxiBqAblV73iS4pIgo=; b=XYUOfhJkNs7TOEWB8bVxn3vNfu0TTXgWsjJ0X6jO5fGP0FSVIW75zgfb+fcmKi0bd0 y5Z7gSugaK6KSRuDcjNN/h56CkwJUit+uQw9iZSmhq5PFFAkKFsD+7TgI0qpG6C/KjRj Cbss7JNi6ncONyDPzR14GiHXUevkgmURnEwcAF30Vjinmmj+EZQeHyVLz8pKwmUD4H9m W5uKKlRurqZUUAa1uOWPXblmm1vst03nskXKb/BoMJNhEwoBhZIU+FRPR1SUku5hw9hr NBZmw0tjiJItq0/fERi8q1aoARVBEAENkpPA8SAfRL9xJ1W19QXJo/MGCxEiWb1cuXQg Yhtg== X-Gm-Message-State: APzg51AzJeSiBFpDYAwNPcDC8VLAbIBS6nS4QQrMuyieeQAqeXzas8r6 TAC3X4OD1m1SFWI7h41bYRI= X-Google-Smtp-Source: ANB0VdYVkLBU/sIt72P2FLLF/4tM7DuxVZwyRP2MBrfOrNvFPsc8dee70kIm/67E3e7eBElhWIDztw== X-Received: by 2002:aca:b6c5:: with SMTP id g188-v6mr2551298oif.283.1535550056618; Wed, 29 Aug 2018 06:40:56 -0700 (PDT) To: qemu-devel@nongnu.org From: Quan Xu Message-ID: <5ab76c3e-9310-0e08-2f1b-4ff52bf229f8@gmail.com> Date: Wed, 29 Aug 2018 21:40:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::242 Subject: [Qemu-devel] [PATCH RFC] migration: make sure to run iterate precopy during the bulk stage X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dgilbert@redhat.com, kvm , quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 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 =C2=A0bulk stage Since the bulk stage assumes in (migration_bitmap_find_dirty) that every page is dirty, return a rough total ram as pending size to make sure that migration thread continues to run iterate precopy during the bulk stage. Otherwise the downtime grows unpredictably, as migration thread needs to send both the rest of pages and dirty pages during complete precopy. Signed-off-by: Quan Xu --- =C2=A0migration/ram.c | 3 ++- =C2=A01 file changed, 2 insertions(+), 1 deletion(-) 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=20 *opaque, uint64_t max_size, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* We can do postcopy, an= d all the data is postcopiable */ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *res_compatible +=3D rema= ining_size; =C2=A0=C2=A0=C2=A0=C2=A0 } else { -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *res_precopy_only +=3D remainin= g_size; +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *res_precopy_only +=3D (rs->ram= _bulk_stage ? +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 ram_bytes_total() : remaining_size); =C2=A0=C2=A0=C2=A0=C2=A0 } =C2=A0} -- 1.8.3.1