From: Markus Armbruster <armbru@redhat.com>
To: Hao Xiang <hao.xiang@bytedance.com>
Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net,
peterx@redhat.com, farosas@suse.de, eblake@redhat.com,
thuth@redhat.com, lvivier@redhat.com, qemu-devel@nongnu.org,
jdenemar@redhat.com
Subject: Re: [PATCH v2 6/7] migration/multifd: Add zero pages and zero bytes counter to migration status interface.
Date: Wed, 21 Feb 2024 13:07:54 +0100 [thread overview]
Message-ID: <87plwqt3z9.fsf@pond.sub.org> (raw)
In-Reply-To: <20240216224002.1476890-7-hao.xiang@bytedance.com> (Hao Xiang's message of "Fri, 16 Feb 2024 22:40:01 +0000")
Hao Xiang <hao.xiang@bytedance.com> writes:
> This change extends the MigrationStatus interface to track zero pages
> and zero bytes counter.
>
> Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
> ---
> migration/migration-hmp-cmds.c | 4 ++++
> migration/migration.c | 2 ++
> qapi/migration.json | 15 ++++++++++++++-
> tests/migration/guestperf/engine.py | 2 ++
> 4 files changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
> index 7e96ae6ffd..abe035c9f2 100644
> --- a/migration/migration-hmp-cmds.c
> +++ b/migration/migration-hmp-cmds.c
> @@ -111,6 +111,10 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
> info->ram->normal);
> monitor_printf(mon, "normal bytes: %" PRIu64 " kbytes\n",
> info->ram->normal_bytes >> 10);
> + monitor_printf(mon, "zero: %" PRIu64 " pages\n",
> + info->ram->zero);
> + monitor_printf(mon, "zero bytes: %" PRIu64 " kbytes\n",
> + info->ram->zero_bytes >> 10);
> monitor_printf(mon, "dirty sync count: %" PRIu64 "\n",
> info->ram->dirty_sync_count);
> monitor_printf(mon, "page size: %" PRIu64 " kbytes\n",
> diff --git a/migration/migration.c b/migration/migration.c
> index ab21de2cad..1968ea7075 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1112,6 +1112,8 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
> info->ram->skipped = 0;
> info->ram->normal = stat64_get(&mig_stats.normal_pages);
> info->ram->normal_bytes = info->ram->normal * page_size;
> + info->ram->zero = stat64_get(&mig_stats.zero_pages);
> + info->ram->zero_bytes = info->ram->zero * page_size;
> info->ram->mbps = s->mbps;
> info->ram->dirty_sync_count =
> stat64_get(&mig_stats.dirty_sync_count);
> diff --git a/qapi/migration.json b/qapi/migration.json
> index e2450b92d4..892875da18 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -63,6 +63,10 @@
> # between 0 and @dirty-sync-count * @multifd-channels. (since
> # 7.1)
> #
> +# @zero: number of zero pages (since 9.0)
> +#
> +# @zero-bytes: number of zero bytes sent (since 9.0)
Awfully terse. How are these two related?
Recommend to name the first one @zero-pages.
> +#
> # Features:
> #
> # @deprecated: Member @skipped is always zero since 1.5.3
> @@ -81,7 +85,8 @@
> 'multifd-bytes': 'uint64', 'pages-per-second': 'uint64',
> 'precopy-bytes': 'uint64', 'downtime-bytes': 'uint64',
> 'postcopy-bytes': 'uint64',
> - 'dirty-sync-missed-zero-copy': 'uint64' } }
> + 'dirty-sync-missed-zero-copy': 'uint64',
> + 'zero': 'int', 'zero-bytes': 'int' } }
Please use 'size' for byte counts such as @zero-bytes.
>
> ##
> # @XBZRLECacheStats:
> @@ -332,6 +337,8 @@
> # "duplicate":123,
> # "normal":123,
> # "normal-bytes":123456,
> +# "zero":123,
> +# "zero-bytes":123456,
> # "dirty-sync-count":15
> # }
> # }
> @@ -358,6 +365,8 @@
> # "duplicate":123,
> # "normal":123,
> # "normal-bytes":123456,
> +# "zero":123,
> +# "zero-bytes":123456,
> # "dirty-sync-count":15
> # }
> # }
> @@ -379,6 +388,8 @@
> # "duplicate":123,
> # "normal":123,
> # "normal-bytes":123456,
> +# "zero":123,
> +# "zero-bytes":123456,
> # "dirty-sync-count":15
> # },
> # "disk":{
> @@ -405,6 +416,8 @@
> # "duplicate":10,
> # "normal":3333,
> # "normal-bytes":3412992,
> +# "zero":3333,
> +# "zero-bytes":3412992,
> # "dirty-sync-count":15
> # },
> # "xbzrle-cache":{
> diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
> index 608d7270f6..75315b99b7 100644
> --- a/tests/migration/guestperf/engine.py
> +++ b/tests/migration/guestperf/engine.py
> @@ -92,6 +92,8 @@ def _migrate_progress(self, vm):
> info["ram"].get("skipped", 0),
> info["ram"].get("normal", 0),
> info["ram"].get("normal-bytes", 0),
> + info["ram"].get("zero", 0);
> + info["ram"].get("zero-bytes", 0);
> info["ram"].get("dirty-pages-rate", 0),
> info["ram"].get("mbps", 0),
> info["ram"].get("dirty-sync-count", 0)
next prev parent reply other threads:[~2024-02-21 15:57 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 22:39 [PATCH v2 0/7] Introduce multifd zero page checking Hao Xiang
2024-02-16 22:39 ` [PATCH v2 1/7] migration/multifd: Add new migration option zero-page-detection Hao Xiang
2024-02-21 12:03 ` Markus Armbruster
2024-02-23 4:22 ` [External] " Hao Xiang
2024-02-21 13:58 ` Elena Ufimtseva
2024-02-23 4:37 ` [External] " Hao Xiang
2024-02-22 10:36 ` Peter Xu
2024-02-26 7:18 ` Wang, Lei
2024-02-26 19:45 ` [External] " Hao Xiang
2024-02-16 22:39 ` [PATCH v2 2/7] migration/multifd: Support for zero pages transmission in multifd format Hao Xiang
2024-02-21 15:37 ` Elena Ufimtseva
2024-02-23 4:18 ` [External] " Hao Xiang
2024-02-16 22:39 ` [PATCH v2 3/7] migration/multifd: Zero page transmission on the multifd thread Hao Xiang
2024-02-16 23:49 ` Richard Henderson
2024-02-23 4:38 ` [External] " Hao Xiang
2024-02-24 19:06 ` Hao Xiang
2024-02-21 12:04 ` Markus Armbruster
2024-02-21 16:00 ` Elena Ufimtseva
2024-02-23 4:59 ` [External] " Hao Xiang
2024-02-21 21:04 ` Fabiano Rosas
2024-02-23 2:20 ` Peter Xu
2024-02-23 5:15 ` [External] " Hao Xiang
2024-02-24 22:56 ` Hao Xiang
2024-02-26 1:30 ` Peter Xu
2024-02-23 5:18 ` Hao Xiang
2024-02-23 14:47 ` Fabiano Rosas
2024-02-16 22:39 ` [PATCH v2 4/7] migration/multifd: Enable zero page checking from multifd threads Hao Xiang
2024-02-21 16:11 ` Elena Ufimtseva
2024-02-23 5:24 ` [External] " Hao Xiang
2024-02-21 21:06 ` Fabiano Rosas
2024-02-23 2:33 ` Peter Xu
2024-02-23 6:02 ` [External] " Hao Xiang
2024-02-24 23:03 ` Hao Xiang
2024-02-26 1:43 ` Peter Xu
2024-02-23 5:47 ` Hao Xiang
2024-02-23 14:38 ` Fabiano Rosas
2024-02-16 22:40 ` [PATCH v2 5/7] migration/multifd: Add new migration test cases for legacy zero page checking Hao Xiang
2024-02-21 20:59 ` Fabiano Rosas
2024-02-23 4:20 ` [External] " Hao Xiang
2024-02-16 22:40 ` [PATCH v2 6/7] migration/multifd: Add zero pages and zero bytes counter to migration status interface Hao Xiang
2024-02-21 12:07 ` Markus Armbruster [this message]
2024-02-16 22:40 ` [PATCH v2 7/7] Update maintainer contact for migration multifd zero page checking acceleration Hao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plwqt3z9.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=hao.xiang@bytedance.com \
--cc=jdenemar@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.