From: Markus Armbruster <armbru@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 12/20] migration: Change HMP 'info migrate_parameters' output
Date: Tue, 15 Sep 2026 13:57:37 +0200 [thread overview]
Message-ID: <87bj9ypw0e.fsf@pond.sub.org> (raw)
In-Reply-To: <20260915000209.3692668-13-farosas@suse.de> (Fabiano Rosas's message of "Mon, 14 Sep 2026 21:02:00 -0300")
Fabiano Rosas <farosas@suse.de> writes:
> The output of 'info migrate_parameters' includes units of measurement
> for a few parameters. This is convenient for a user. However, having
> the units also means that every parameter must have its own separate
> piece of code to handle the formatting.
>
>>From a development and maintenance perspective, having a list of
> parameters explicitly written in several parts of the code brings
> annoyances: conflicts during rebase, extra hits when grepping,
> contributors need to mirror a change to various locations, etc.
>
> As the HMP output is not part of any ABI, remove the units from the
> output to avoid this requirement of having individualized code for
> every parameter. Next patches will take benefit from that and use
> generic code to output the parameters values in HMP.
>
> Aside from the units, also remove quotes from around the TLS options
> strings as this is inconsistent with all the other strings.
>
> Similarly, change block-bitmap-mapping format to remove the arrows
> (->) for the mappings as not all parameters represented as a list have
> this semantics. This requires updating one of the iotests.
>
> Before: After:
> (unchanged entries omitted)
> announce-initial: 50 ms announce-initial: 50
> announce-max: 550 ms announce-max: 550
> announce-rounds: 5 announce-rounds: 5
> announce-step: 100 ms announce-step: 100
> tls-creds: '' tls-creds:
> tls-hostname: '' tls-hostname:
> tls-authz: '' tls-authz:
> max-bandwidth: 134217728 bytes/second max-bandwidth: 134217728
> avail-switchover-bandwidth: 0 bytes/second avail-switchover-bandwidth: 0
> max-postcopy-bandwidth: 0 bytes/second max-postcopy-bandwidth: 0
> downtime-limit: 300 ms downtime-limit: 300
> x-checkpoint-delay: 20000 ms x-checkpoint-delay: 20000
> xbzrle-cache-size: 67108864 bytes xbzrle-cache-size: 67108864
> x-vcpu-dirty-limit-period: 1000 ms x-vcpu-dirty-limit-period: 1000
> vcpu-dirty-limit: 1 MB/s vcpu-dirty-limit: 1
> x-rdma-chunk-size: 1048576 bytes x-rdma-chunk-size: 1048576
> block-bitmap-mapping: block-bitmap-mapping:
> 'node-src' -> 'node-dst' bitmaps:
> 'bmap0' -> 'bmap0' name: bmap0 alias: bmap0
> node-name: node-src alias: node-dst
I think the value of block-bitmap-mapping could be more legible.
@block-bitmap-mapping has the following structure (using JSON as
notation):
[{"node-name": NODE-NAME1, "alias": NODE-ALIAS1,
"bitmaps": [{"name": BITMAP-NAME1.1, "alias": BITMAP-ALIAS1.1,
"transform": {"persistent": PERS1.1}}
{"name": BITMAP-NAME1.2, "alias": BITMAP-ALIAS1.2,
"transform": {"persistent": PERS1.2}},
...]},
{"node-name": NODE-NAME2, "alias": NODE-ALIAS2,
"bitmaps": [{"name": BITMAP-NAME2.1, ...}, ...]},
...]
As far as I can tell, it gets formatted like
block-bitmap-mapping:
bitmaps:
name: BITMAP-NAME1.1 transform: persistent: PERS1.1 alias: ALIAS-NAME1.1
name: BITMAP-NAME1.2 transform: persistent: PERS1.2 alias: ALIAS-NAME1.2
node-name: NODE-NAME1 alias: NODE-ALIAS1
name: BITMAP-NAME2.1 ...
node-name: NODE-NAME2 alias: NODE-ALIAS2
Suggest to do it more like this
block-bitmap-mapping:
node-name: NODE-NAME1 alias: NODE-ALIAS1
bitmaps:
name: BITMAP-NAME1.1 alias: BITMAP-ALIAS1.1 persistent: PERS1.1
name: BITMAP-NAME1.2 alias: BITMAP-ALIAS1.2 persistent: PERS1.2
node-name: NODE-NAME2 alias: NODE-ALIAS2
bitmaps:
name: BITMAP-NAME2.1 ...
Or just dump as pretty-printed JSON and call it good.
next prev parent reply other threads:[~2026-09-15 11:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 0:01 [PATCH v3 00/20] migration: MigrationParameters changes Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 01/20] checkpatch: Fix checking of newlines in error messages Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 02/20] migration/options.c: Don't export migrate_tls_opts_free Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 03/20] migration: Rename variables in qmp_migrate_set_parameters Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 04/20] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 05/20] migration: Merge parameter structs instead of assigning one by one Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 06/20] migration: Open code migrate_params_apply Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 07/20] migration: Stop freeing s->parameters members individually Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 08/20] migration: Use migrate_params_free during finalize Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 09/20] tests/qtest/migration: Add a test for HMP Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 10/20] tests/qtest/migration: Add a test for HMP completion Fabiano Rosas
2026-09-15 0:01 ` [PATCH v3 11/20] migration: HMP: Change bandwidth parameters expected input unit Fabiano Rosas
2026-09-15 0:02 ` [PATCH v3 12/20] migration: Change HMP 'info migrate_parameters' output Fabiano Rosas
2026-09-15 11:57 ` Markus Armbruster [this message]
2026-09-17 21:08 ` Dr. David Alan Gilbert
2026-09-15 0:02 ` [PATCH v3 13/20] migration: Use keyval input visitor in HMP set command Fabiano Rosas
2026-09-17 11:08 ` Markus Armbruster
2026-09-17 18:28 ` Peter Xu
2026-09-17 18:41 ` Markus Armbruster
2026-09-15 0:02 ` [PATCH v3 14/20] migration: Use output visitor in info command Fabiano Rosas
2026-09-17 11:53 ` Markus Armbruster
2026-09-17 11:58 ` Markus Armbruster
2026-09-17 18:41 ` Peter Xu
2026-09-17 20:57 ` Dr. David Alan Gilbert
2026-09-18 8:20 ` Markus Armbruster
2026-09-18 22:32 ` Fabiano Rosas
2026-09-18 22:41 ` Fabiano Rosas
2026-09-15 0:02 ` [PATCH v3 15/20] migration: Rewrite migrate_set_parameter_completion using QDict Fabiano Rosas
2026-09-17 12:02 ` Markus Armbruster
2026-09-15 0:02 ` [PATCH v3 16/20] migration: Add capabilities into MigrationParameters Fabiano Rosas
2026-09-15 0:02 ` [PATCH v3 17/20] migration: Remove s->capabilities Fabiano Rosas
2026-09-15 0:02 ` [PATCH v3 18/20] qapi/migration: Deprecate capabilities commands Fabiano Rosas
2026-09-15 0:02 ` [PATCH v3 19/20] migration: Set the parameters present flag with a clone visitor Fabiano Rosas
2026-09-17 14:10 ` Markus Armbruster
2026-09-15 0:02 ` [PATCH v3 20/20] qapi: Remove MigrationParameter Fabiano Rosas
2026-09-17 12:06 ` Markus Armbruster
2026-09-22 12:44 ` [PATCH v3 00/20] migration: MigrationParameters changes Fabiano Rosas
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=87bj9ypw0e.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.