qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Manish Mishra <manish.mishra@nutanix.com>,
	qemu-devel@nongnu.org, leobras@redhat.com, farosas@suse.de,
	Juraj Marcin <jmarcin@redhat.com>
Subject: Re: [PATCH v2] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg
Date: Tue, 11 Mar 2025 15:57:35 -0400	[thread overview]
Message-ID: <Z9CVr9jbcq810U2i@x1.local> (raw)
In-Reply-To: <Z9BXw6iZfi_UKx-t@redhat.com>

On Tue, Mar 11, 2025 at 03:33:23PM +0000, Daniel P. Berrangé wrote:
> On Tue, Mar 11, 2025 at 11:20:50AM -0400, Peter Xu wrote:
> > On Tue, Mar 11, 2025 at 08:13:16AM +0000, Daniel P. Berrangé wrote:
> > > On Mon, Mar 10, 2025 at 04:03:26PM -0400, Peter Xu wrote:
> > > > On Mon, Mar 10, 2025 at 07:48:16PM +0000, Daniel P. Berrangé wrote:
> > > > > Given this is in public API, the data needs to remain reported accurately
> > > > > for the whole deprecation period. IOW, the patch to qiochannel needs to
> > > > > preserve this data too.
> > > > 
> > > > :-(
> > > > 
> > > > We could potentially mark MigrationStats to be experimental as a whole and
> > > > declare that in deprecate.rst too, then after two releases, we can randomly
> > > > add / remove fields as wish without always need to go through the
> > > > deprecation process, am I right?
> > > 
> > > IMHO that would be an abuse of the process and harmful to applications
> > > and users consuming stats.
> > 
> > Ah I just noticed that's the exact same one we included in
> > query-migrate.. Then yes, the stable ABI is important here.
> > 
> > So for this specific case, maybe we shouldn't have exposed it in QMP from
> > the start.
> > 
> > To me, it's a question on whether we could have something experimental and
> > be exposed to QMP, where we don't need to guarantee a strict stable ABI, or
> > a very loose ABI (e.g. we can guarantee the command exists, and with
> > key-value string-integer pairs, nothing else).
> 
> QMP has the ability to tag commands/fields, etc as experimental.
> 
> libvirt will explicitly avoid consuming or exposing anything with
> an experimental tag on it.
> 
> > Maybe what we need is a new MigrationInfoOptional, to be embeded into
> > MigrationInfo (or not), marked experimental.  Then in the future whenever
> > we want to add some new statistics, we could decide whether it should be
> > part of stable ABI or not.
> 
> That is not required - individual struct fields can be marked
> experimental.

Yes that'll work too.  The important bit here is I think we should start to
seriously evaluate which to expose to QAPI as stable API when we add stats
into it.  We used to not pay too much attention.

With MigrationInfoOptional, we should suggest any new field to be added
there by default, then whatever needs to be put out of experimental needs
explicit justifications.  Or we can also document any new migration field
at least in the stats to be marked as experimental unless justified.

> 
> The key question is what the intended usage of the fields/stats/etc
> is to be. If you want it used by libvirt and mgmt apps it would need
> to be formally supported. If it is just for adhoc QEMU developer
> debugging and doesn't need libvirt / app support, then experimental
> is fine.

To my initial thoughts, I want Libvirt to fetch it.  However I don't want
Libvirt to parse it.

For example, for things like "whether zerocopy send succeeded or not", or
"how much time we spent on sending non-iterable device states", they're
almost not consumable for users, but great for debuggings.  It would be
great if Libvirt could know their existance, fetch it (e.g. once after
migration completes) then dump it to the logfile to help debugging and
triaging QEMU issues.  In that case parsing is not needed, the whole result
can be attached to the log as a JSON blob.  That releases the burden from
the need to maintain compatibility that we don't really need and nobody
cared (I bet it's the case here for zerocopy stats, but we got restricted
by our promises even if it may ultimately benefit nobody..).

Thanks,

-- 
Peter Xu



  reply	other threads:[~2025-03-11 19:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10  1:15 [PATCH v2] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg Manish Mishra
2025-03-10 19:12 ` Peter Xu
2025-03-10 19:48   ` Daniel P. Berrangé
2025-03-10 20:03     ` Peter Xu
2025-03-10 22:45       ` Manish
2025-03-11 15:22         ` Peter Xu
2025-03-11 15:30           ` Manish
2025-03-11  8:13       ` Daniel P. Berrangé
2025-03-11 15:20         ` Peter Xu
2025-03-11 15:33           ` Daniel P. Berrangé
2025-03-11 19:57             ` Peter Xu [this message]
2025-03-11 20:08               ` Daniel P. Berrangé
2025-03-11 21:37                 ` Peter Xu

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=Z9CVr9jbcq810U2i@x1.local \
    --to=peterx@redhat.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@redhat.com \
    --cc=leobras@redhat.com \
    --cc=manish.mishra@nutanix.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 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).