qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Leonardo Bras Soares Passos" <lsoaresp@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Chensheng Dong" <chdong@redhat.com>,
	"Zhiyi Guo" <zhguo@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>
Subject: Re: [PATCH] migration: Allow user to specify migration available bandwidth
Date: Wed, 26 Jul 2023 11:12:31 -0400	[thread overview]
Message-ID: <ZME33z8vFL0fRGYV@x1n> (raw)
In-Reply-To: <87o7jz8a6o.fsf@pond.sub.org>

On Wed, Jul 26, 2023 at 08:21:35AM +0200, Markus Armbruster wrote:
> Peter Xu <peterx@redhat.com> writes:
> 
> > Hi, Markus,
> >
> > On Tue, Jul 25, 2023 at 01:10:01PM +0200, Markus Armbruster wrote:
> 
> [...]
> 
> >> For better or worse, we duplicate full documentation between
> >> MigrationParameter, MigrateSetParameters, and MigrationParameters.  This
> >> would be the first instance where we reference instead.  I'm not opposed
> >> to use references, but if we do, I want them used consistently.
> >
> > We discussed this over the other "switchover" parameter, but that patchset
> > just stranded..
> >
> > Perhaps I just provide a pre-requisite patch to remove all the comments in
> > MigrateSetParameters and MigrationParameters, letting them all point to
> > MigrationParameter?
> 
> Simplifies maintaining the doc commments.  But how does it affect the
> documentation generated from it?  Better, neutral, or worse?

Probably somewhere neutral.  There are definitely benefits, shorter
man/html page in total, and avoid accidentally different docs over the same
fields.  E.g., we sometimes have different wordings for different objects:

       max-cpu-throttle
              maximum cpu throttle percentage.  Defaults to 99.  (Since 3.1)

       max-cpu-throttle: int (optional)
              maximum cpu throttle percentage.  The default value is 99. (Since 3.1)

This one is fine, but it's just very easy to leak in something that shows
differently.  It's good to provide coherent documentation for the same
fields over all three objects.

When looking at qemu-qmp-ref.7, it can be like this when we can invite the
reader to read the other section (assuming we only keep MigrationParameter
to keep the documentations):

   MigrationParameters (Object)

       The object structure to represent a list of migration parameters.
       The optional members aren't actually optional.  For detailed
       explanation for each of the field, please refer to the documentation
       of MigrationParameter.

But the problem is we always will generate the Members entry, where now
it'll all filled up with "Not documented"..

   Members
       announce-initial: int (optional)
              Not documented

       announce-max: int (optional)
              Not documented

       announce-rounds: int (optional)
              Not documented

       [...]

I think maybe it's better we just list the members without showing "Not
documented" every time for the other two objects.  Not sure whether it's an
easy way to fix it, or is it a major issue.

For developers, dedup the comment should always be a win, afaict.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2023-07-26 15:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 17:07 [PATCH] migration: Allow user to specify migration available bandwidth Peter Xu
2023-07-24 18:04 ` Daniel P. Berrangé
2023-07-24 18:12   ` Peter Maydell
2023-07-24 19:47   ` Peter Xu
2023-07-25  9:16     ` Daniel P. Berrangé
2023-07-25 15:54       ` Peter Xu
2023-07-25 16:09         ` Daniel P. Berrangé
2023-07-25 16:38           ` Peter Xu
2023-07-25 17:10             ` Daniel P. Berrangé
2023-07-26 15:19               ` Peter Xu
2023-07-25 11:10 ` Markus Armbruster
2023-07-25 16:42   ` Peter Xu
2023-07-26  6:21     ` Markus Armbruster
2023-07-26 15:12       ` Peter Xu [this message]
2023-08-04 12:06         ` Markus Armbruster
2023-08-04 13:28           ` Peter Xu
2023-08-05  8:13             ` Markus Armbruster
2023-08-04 13:39         ` Daniel P. Berrangé
2023-08-04 14:02           ` Peter Xu
2023-08-05  8:05             ` Markus Armbruster

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=ZME33z8vFL0fRGYV@x1n \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=chdong@redhat.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=lsoaresp@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=zhguo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).