On Wed, Feb 28, 2024 at 1:43 AM Markus Armbruster <arm...@redhat.com> wrote:
>
> 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..1e66272f8f 100644
> > --- a/qapi/migration.json
> > +++ b/qapi/migration.json
> > @@ -653,6 +653,18 @@
> >  { 'enum': 'MigMode',
> >    'data': [ 'normal', 'cpr-reboot' ] }
> >
> > +##
> > +# @ZeroPageDetection:
> > +#
> > +# @none: Do not perform zero page checking.
> > +#
> > +# @legacy: Perform zero page checking from main migration thread.
> > +#
> > +# Since: 9.0
> > +##
> > +{ 'enum': 'ZeroPageDetection',
> > +  'data': [ 'none', 'legacy' ] }
> > +
> >  ##
> >  # @BitmapMigrationBitmapAliasTransform:
> >  #
> > @@ -874,6 +886,9 @@
> >  # @mode: Migration mode. See description in @MigMode. Default is 'normal'.
> >  #        (Since 8.2)
> >  #
> > +# @zero-page-detection: Whether and how to detect zero pages. More details
> > +#     see description in @ZeroPageDetection. Default is 'legacy'.  (since 
> > 9.0)
> > +#
>
> I'm not sure we need to point to the member's type.  If we want to, we
> better fix the prose: "For additional information, see
> @ZeroPageDetection" or similar.

This is mimicking what was done for the "mode" migration option. There
aren't many enumeration types on the interface I can learn from.

Existing code

#
# @mode: Migration mode. See description in @MigMode. Default is 'normal'.
# (Since 8.2)

>
> Two spaces between sentences for consistency, please.  Also, limit line
> length 70 characters.
>
> Together:
>
>    # @zero-page-detection: Whether and how to detect zero pages.  For
>    #     additional information, see @ZeroPageDetection.  Default is
>    #     'multifd'.  (since 9.0)
>
> Same for the other two copies.

Will change that.

>
> >  # Features:
> >  #
> >  # @deprecated: Member @block-incremental is deprecated.  Use
> > @@ -907,7 +922,8 @@
> >             'block-bitmap-mapping',
> >             { 'name': 'x-vcpu-dirty-limit-period', 'features': ['unstable'] 
> > },
> >             'vcpu-dirty-limit',
> > -           'mode'] }
> > +           'mode',
> > +           'zero-page-detection'] }
> >
> >  ##
> >  # @MigrateSetParameters:
> > @@ -1066,6 +1082,9 @@
> >  # @mode: Migration mode. See description in @MigMode. Default is 'normal'.
> >  #        (Since 8.2)
> >  #
> > +# @zero-page-detection: Whether and how to detect zero pages. More details
> > +#     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: Whether and how to detect zero pages. More details
> > +#     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:
>

Reply via email to