Hao Xiang <hao.xi...@bytedance.com> writes: > This new parameter controls where the zero page checking is running. > 1. If this parameter is set to 'legacy', zero page checking is > done in the migration main thread. > 2. If this parameter is set to 'none', zero page checking is disabled. > > Signed-off-by: Hao Xiang <hao.xi...@bytedance.com>
[...] > diff --git a/qapi/migration.json b/qapi/migration.json > index 5a565d9b8d..99843a8e95 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -653,6 +653,17 @@ > { 'enum': 'MigMode', > 'data': [ 'normal', 'cpr-reboot' ] } > > +## > +# @ZeroPageDetection: > +# > +# @legacy: Perform zero page checking from main migration thread. (since 9.0) > +# > +# @none: Do not perform zero page checking. > +# > +## The entire type is since 9.0. Thus: ## # @ZeroPageDetection: # # @legacy: Perform zero page checking from main migration thread. # # @none: Do not perform zero page checking. # # Since: 9.0 ## > +{ 'enum': 'ZeroPageDetection', > + 'data': [ 'legacy', 'none' ] } > + > ## > # @BitmapMigrationBitmapAliasTransform: > # > @@ -874,6 +885,9 @@ > # @mode: Migration mode. See description in @MigMode. Default is 'normal'. > # (Since 8.2) > # > +# @zero-page-detection: See description in @ZeroPageDetection. > +# Default is 'legacy'. (Since 9.0) The description feels a bit lazy :) Suggest # @zero-page-detection: Whether and how to detect zero pages. Default # is 'legacy'. (since 9.0) Same for the other two copies. > +# > # Features: > # > # @deprecated: Member @block-incremental is deprecated. Use > @@ -907,7 +921,8 @@ > 'block-bitmap-mapping', > { 'name': 'x-vcpu-dirty-limit-period', 'features': ['unstable'] }, > 'vcpu-dirty-limit', > - 'mode'] } > + 'mode', > + 'zero-page-detection'] } > > ## > # @MigrateSetParameters: > @@ -1066,6 +1081,10 @@ > # @mode: Migration mode. See description in @MigMode. Default is 'normal'. > # (Since 8.2) > # > +# @zero-page-detection: See description in @ZeroPageDetection. > +# Default is 'legacy'. (Since 9.0) > +# > +# > # Features: > # > # @deprecated: Member @block-incremental is deprecated. Use > @@ -1119,7 +1138,8 @@ > '*x-vcpu-dirty-limit-period': { 'type': 'uint64', > 'features': [ 'unstable' ] }, > '*vcpu-dirty-limit': 'uint64', > - '*mode': 'MigMode'} } > + '*mode': 'MigMode', > + '*zero-page-detection': 'ZeroPageDetection'} } > > ## > # @migrate-set-parameters: > @@ -1294,6 +1314,9 @@ > # @mode: Migration mode. See description in @MigMode. Default is 'normal'. > # (Since 8.2) > # > +# @zero-page-detection: See description in @ZeroPageDetection. > +# Default is 'legacy'. (Since 9.0) > +# > # Features: > # > # @deprecated: Member @block-incremental is deprecated. Use > @@ -1344,7 +1367,8 @@ > '*x-vcpu-dirty-limit-period': { 'type': 'uint64', > 'features': [ 'unstable' ] }, > '*vcpu-dirty-limit': 'uint64', > - '*mode': 'MigMode'} } > + '*mode': 'MigMode', > + '*zero-page-detection': 'ZeroPageDetection'} } > > ## > # @query-migrate-parameters: