From nobody Sat Feb 7 08:58:31 2026 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.zoho.com; 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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486979820742969.4237050153657; Mon, 13 Feb 2017 01:57:00 -0800 (PST) Received: from localhost ([::1]:55418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdDNT-000459-91 for importer@patchew.org; Mon, 13 Feb 2017 04:56:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdDLZ-0002n3-4C for qemu-devel@nongnu.org; Mon, 13 Feb 2017 04:55:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdDLV-0004KN-UR for qemu-devel@nongnu.org; Mon, 13 Feb 2017 04:55:01 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:21866 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cdDLV-0004HI-Jb; Mon, 13 Feb 2017 04:54:57 -0500 Received: from kvm.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id v1D9snJO003164; Mon, 13 Feb 2017 12:54:51 +0300 (MSK) From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Mon, 13 Feb 2017 12:54:34 +0300 Message-Id: <1486979689-230770-3-git-send-email-vsementsov@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1486979689-230770-1-git-send-email-vsementsov@virtuozzo.com> References: <1486979689-230770-1-git-send-email-vsementsov@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x [fuzzy] X-Received-From: 195.214.232.25 Subject: [Qemu-devel] [PATCH 02/17] migration: fix ram_save_pending 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: kwolf@redhat.com, peter.maydell@linaro.org, vsementsov@virtuozzo.com, famz@redhat.com, lirans@il.ibm.com, quintela@redhat.com, jsnow@redhat.com, armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, amit.shah@redhat.com, pbonzini@redhat.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- migration/ram.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index c688866..5d0bbfd 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2091,8 +2091,12 @@ static void ram_save_pending(QEMUFile *f, void *opaq= ue, uint64_t max_size, remaining_size =3D ram_save_remaining() * TARGET_PAGE_SIZE; } =20 - /* We can do postcopy, and all the data is postcopiable */ - *postcopiable_pending +=3D remaining_size; + if (migrate_postcopy_ram()) { + /* We can do postcopy, and all the data is postcopiable */ + *postcopiable_pending +=3D remaining_size; + } else { + *non_postcopiable_pending +=3D remaining_size; + } } =20 static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host) --=20 1.8.3.1