From nobody Mon Feb 9 14:37:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1658252134; cv=none; d=zohomail.com; s=zohoarc; b=HXDG1dbSfy3eAyebuzwIiP72AvfoLxoRn7GxslEMo6cLdXy/R+tLgpfYQGY6OZnpGySK4Dy16GMQFqWc3nv/+Dam9nawrpB8T0AAwMUjk2kBvYU6+rJvi9zA7oxpdyuEf0h3hbgJd4YDxu3L8OBE8rMQ3a18UqFcmJUd2dAFeR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658252134; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ygJfG344v2gd23UY2aZAuOgm2rvDNGZInXvjcm6cSV8=; b=fEFPZovFnYlHkMQCbLEj2mO3Y4cOClZAITht4au9KVVYz421RByUdMODpmNozzbOHEF5D98YvlQ8fCM9AGVa5BCKmuXfuBSgmA8ZljCvE6fW75MMi9/Sgxd5YCzLHeFV4zLsSAlP5+IXwMJUEGg/Dq5v8xeufMPEeqkIygT8LPw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658252134350262.03649366288346; Tue, 19 Jul 2022 10:35:34 -0700 (PDT) Received: from localhost ([::1]:48868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDr89-00086w-5f for importer@patchew.org; Tue, 19 Jul 2022 13:35:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDqcg-0006sP-9w for qemu-devel@nongnu.org; Tue, 19 Jul 2022 13:03:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDqce-0002y4-BM for qemu-devel@nongnu.org; Tue, 19 Jul 2022 13:03:02 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-640-ykxTJXaUMgatk_v1-o9CbA-1; Tue, 19 Jul 2022 13:02:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C734B8001EA; Tue, 19 Jul 2022 17:02:57 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id D51D540CF8E5; Tue, 19 Jul 2022 17:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658250179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ygJfG344v2gd23UY2aZAuOgm2rvDNGZInXvjcm6cSV8=; b=cDh5DhKZK5JRVAuJNtmX28Qie2qFAg6vbpJqDWtROtDxeCaZgW0lW2U8PMnKidB/5rs9vY eZ2Z+uTskfmk7CutY0mW1Fdr1dnxQAZ85qYUhBLPXKc5yIS7+D5vQeFJaGey+i7EwGRGoZ afYYobfs/cf8P8+RmqfnR8c+ZrTK22s= X-MC-Unique: ykxTJXaUMgatk_v1-o9CbA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, quintela@redhat.com, berrange@redhat.com, peterx@redhat.com, iii@linux.ibm.com, huangy81@chinatelecom.cn Subject: [PULL 26/29] Add dirty-sync-missed-zero-copy migration stat Date: Tue, 19 Jul 2022 18:02:18 +0100 Message-Id: <20220719170221.576190-27-dgilbert@redhat.com> In-Reply-To: <20220719170221.576190-1-dgilbert@redhat.com> References: <20220719170221.576190-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658252134812100001 From: Leonardo Bras Signed-off-by: Leonardo Bras Acked-by: Markus Armbruster Acked-by: Peter Xu Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20220711211112.18951-3-leobras@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 2 ++ monitor/hmp-cmds.c | 5 +++++ qapi/migration.json | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 7c7e529ca7..15ae48b209 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1057,6 +1057,8 @@ static void populate_ram_info(MigrationInfo *info, Mi= grationState *s) info->ram->normal_bytes =3D ram_counters.normal * page_size; info->ram->mbps =3D s->mbps; info->ram->dirty_sync_count =3D ram_counters.dirty_sync_count; + info->ram->dirty_sync_missed_zero_copy =3D + ram_counters.dirty_sync_missed_zero_copy; info->ram->postcopy_requests =3D ram_counters.postcopy_requests; info->ram->page_size =3D page_size; info->ram->multifd_bytes =3D ram_counters.multifd_bytes; diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index ca98df0495..a6dc79e0d5 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -307,6 +307,11 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) monitor_printf(mon, "postcopy ram: %" PRIu64 " kbytes\n", info->ram->postcopy_bytes >> 10); } + if (info->ram->dirty_sync_missed_zero_copy) { + monitor_printf(mon, + "Zero-copy-send fallbacks happened: %" PRIu64 "= times\n", + info->ram->dirty_sync_missed_zero_copy); + } } =20 if (info->has_disk) { diff --git a/qapi/migration.json b/qapi/migration.json index 7586df3dea..81185d4311 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -55,6 +55,10 @@ # @postcopy-bytes: The number of bytes sent during the post-copy phase # (since 7.0). # +# @dirty-sync-missed-zero-copy: Number of times dirty RAM synchronization = could +# not avoid copying dirty pages. This is bet= ween +# 0 and @dirty-sync-count * @multifd-channel= s. +# (since 7.1) # Since: 0.14 ## { 'struct': 'MigrationStats', @@ -65,7 +69,8 @@ 'postcopy-requests' : 'int', 'page-size' : 'int', 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64', 'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64', - 'postcopy-bytes' : 'uint64' } } + 'postcopy-bytes' : 'uint64', + 'dirty-sync-missed-zero-copy' : 'uint64' } } =20 ## # @XBZRLECacheStats: --=20 2.36.1