Hao Xiang <hao.xi...@bytedance.com> writes: > This change extends the MigrationStatus interface to track zero pages > and zero bytes counter. > > Signed-off-by: Hao Xiang <hao.xi...@bytedance.com>
[...] > diff --git a/qapi/migration.json b/qapi/migration.json > index ca9561fbf1..03b850bab7 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-pages: number of zero pages (since 9.0) > +# > +# @zero-bytes: number of zero bytes sent (since 9.0) > +# Discussion of v3 has led me to believe: 1. A page is either migrated as a normal page or as a zero page. 2. The following equations hold: @normal-bytes = @normal * @page-size @zero-bytes = @zero-pages * @page-size 3. @zero-pages is the same as @duplicate, with a better name. We intend to drop @duplicate eventually. If this is correct, I'd like you to A. Name it @zero for consistency with @normal. Disregard my advice to name it @zero-pages; two consistent bad names are better than one bad name, one good name, and inconsistency. B. Add @zero and @zero-bytes next to @normal and @normal-bytes. C. Deprecate @duplicate (item 3). Separate patch, please. D. Consider documenting more clearly what normal and zero pages are (item 1), and how @FOO, @FOO-pages and @page-size are related (item 2). Could be done in a followup patch. > # 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-pages': 'int', 'zero-bytes': 'size' } } > [...]