All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: jasowang@redhat.com, mst@redhat.com, armbru@redhat.com,
	peterx@redhat.com, farosas@suse.de, raphael.s.norwitz@gmail.com,
	bchaney@akamai.com, qemu-devel@nongnu.org, pbonzini@redhat.com,
	yc-core@yandex-team.ru, mark.caveayland@nutanix.com,
	Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH v18 09/14] qapi: add local migration parameter
Date: Mon, 13 Jul 2026 19:37:50 +0100	[thread overview]
Message-ID: <alUwflog7Xd34Vd4@redhat.com> (raw)
In-Reply-To: <25b5e9a6-e563-4ab0-9075-04a3a00d3b33@yandex-team.ru>

On Mon, Jul 13, 2026 at 08:55:37PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 13.07.26 14:21, Daniel P. Berrangé wrote:
> > On Mon, Jul 13, 2026 at 01:55:48PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > > On 13.07.26 12:51, Daniel P. Berrangé wrote:
> > > > On Fri, Jul 10, 2026 at 10:17:58PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > > > > We are going to implement local-migration feature: some devices will be
> > > > > able to transfer open file descriptors through migration stream (which
> > > > > must UNIX domain socket for that purpose).  This allows to transfer the
> > > > > whole backend state without reconnecting and restarting the backend
> > > > > service. For example, virtio-net will migrate its attached TAP netdev,
> > > > > together with its connected file descriptors.
> > > > > 
> > > > > In this commit we introduce a migration parameter, which enables
> > > > > the feature for devices that support it (none at the moment).
> > > > > 
> > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> > > > > Acked-by: Markus Armbruster <armbru@redhat.com>
> > > > > Acked-by: Peter Xu <peterx@redhat.com>
> > > > > Reviewed-by: Ben Chaney <bchaney@akamai.com>
> > > > > ---
> > > > >    include/migration/misc.h |  2 ++
> > > > >    migration/options.c      | 18 +++++++++++++++++-
> > > > >    qapi/migration.json      | 12 ++++++++++--
> > > > >    3 files changed, 29 insertions(+), 3 deletions(-)
> > > > 
> > > > 
> > > > > diff --git a/qapi/migration.json b/qapi/migration.json
> > > > > index 66bd900465a..03bdf19f3a6 100644
> > > > > --- a/qapi/migration.json
> > > > > +++ b/qapi/migration.json
> > > > > @@ -830,7 +830,8 @@
> > > > >               'zero-page-detection',
> > > > >               'direct-io',
> > > > >               { 'name': 'x-rdma-chunk-size', 'features': [ 'unstable' ] },
> > > > > -           'cpr-exec-command'] }
> > > > > +           'cpr-exec-command',
> > > > > +           'local'] }
> > > > >    ##
> > > > >    # @migrate-set-parameters:
> > > > > @@ -1012,6 +1013,12 @@
> > > > >    #     Must be set to the same value on both source and destination
> > > > >    #     before migration starts.  (Since 11.1)
> > > > >    #
> > > > > +# @local: Enable local migration for devices that support it.  Backend
> > > > > +#     state and its file descriptors can then be passed to the
> > > > > +#     destination in the migration channel.  The migration channel
> > > > > +#     must be a Unix domain socket.  Usually needs to be enabled per
> > > > > +#     device.  (Since 11.2)
> > > > 
> > > > What happens when this is enabled and there are devices which
> > > > don't support it ?
> > > 
> > > These devices are migrated as usual, ignoring "local" option.
> > > 
> > > > 
> > > > What happens when this is enabled and a device on the src
> > > > does not support it but a device on the (newer) QEMU dest
> > > > does support it ?  How does the mgmt app know which devices
> > > > support it ?
> > > 
> > > The only supporting device (TAP-backend) declares support by
> > > "local-migration-supported", so mgmt app should care to set
> > > same value for it on host and target (like for other options
> > > actually). Or simply relay on default, which is true starting
> > > from 11.2 Machine Type.
> > > 
> > > > 
> > > > Can we document the semantics in these cases.
> > > 
> > > That's: "Usually needs to be enabled per device."
> > 
> > ....except that we have it enabled by default for TAP backends
> > in new machine types.... except that it will then break if the
> > app/user has enabled any of the "forbidden" options.
> > 
> > The way this doc is written makes it sound like "local" is an
> > optimization you can turn on in any scenario, and it will do
> > the right thing if the device supports it. That is very much
> > not the case - enabling this flag will definitely break many
> > configs out of the box, with new machine types due to the TAP
> > device defaults & incompatible options.
> 
> Ok, now we decided to NOT make default support for TAP in newer
> machine types.
> 
> So, enabling "local" is safe in existing scenarios, only explicit
> enabling TAP.local-migration-supported will change the behavior.
> 
> Keep "local" documentation as is?
> 
> I see the only way to make it more informative: directly describe
> connection with TAP.local-migration-supported, without general
> phrases about "devices that support" and "usual". We'll have to
> update it when more devices added (my next step is vhost-user-blk),
> but at least, it would be absolutely correct at the moment.

How about....

 # @local: Permit the use of optimizations for local migration.
 #     This must only be set when both the source and destination
 #     QEMU processes are on the same OS and directly connected
 #     with a UNIX domain socket as the migration channel to enable
 #     use of file descriptor passing. Individual device backends
 #     may need additional configuration flags set  to enable local
 #     migration optimizations. This will be documented against the
 #     device backends where it applies. (Since 11.2)


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-07-13 18:38 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 19:17 [PATCH v18 00/14] virtio-net: live-TAP local migration Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 01/14] net/tap: rework tap_parse_script Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 02/14] net/tap: improve script/downscript options documentation Vladimir Sementsov-Ogievskiy
2026-07-13  7:33   ` Markus Armbruster
2026-07-10 19:17 ` [PATCH v18 03/14] net/tap: deprecate "no" as special value for script/downscript Vladimir Sementsov-Ogievskiy
2026-07-13  7:45   ` Markus Armbruster
2026-07-13  9:37     ` Vladimir Sementsov-Ogievskiy
2026-07-13  9:47       ` Daniel P. Berrangé
2026-07-13 10:25         ` Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 04/14] net/tap: move vhost-net open() calls to tap_parse_vhost_fds() Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 05/14] net/tap: move vhost initialization to tap_setup_vhost() Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 06/14] net/tap: use container_of instead of DO_UPCAST Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 07/14] net/tap: QOMify tap backend Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 08/14] net/tap: add TYPE_VMSTATE_IF interface Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 09/14] qapi: add local migration parameter Vladimir Sementsov-Ogievskiy
2026-07-13  9:51   ` Daniel P. Berrangé
2026-07-13 10:55     ` Vladimir Sementsov-Ogievskiy
2026-07-13 11:21       ` Daniel P. Berrangé
2026-07-13 17:55         ` Vladimir Sementsov-Ogievskiy
2026-07-13 18:37           ` Daniel P. Berrangé [this message]
2026-07-13 20:22             ` Michael S. Tsirkin
2026-07-14  6:50               ` Vladimir Sementsov-Ogievskiy
2026-07-14  8:03                 ` Michael S. Tsirkin
2026-07-14  8:04                   ` Vladimir Sementsov-Ogievskiy
2026-07-14  7:55               ` Daniel P. Berrangé
2026-07-14  8:02                 ` Michael S. Tsirkin
2026-07-14  8:18                   ` Daniel P. Berrangé
2026-07-14  6:45             ` Vladimir Sementsov-Ogievskiy
2026-07-10 19:17 ` [PATCH v18 10/14] virtio-net: support local migration of backend Vladimir Sementsov-Ogievskiy
2026-07-10 19:18 ` [PATCH v18 11/14] net/tap: disable read polling for stopped VM Vladimir Sementsov-Ogievskiy
2026-07-10 19:18 ` [PATCH v18 12/14] net/tap: support local migration with virtio-net Vladimir Sementsov-Ogievskiy
2026-07-13  7:57   ` Markus Armbruster
2026-07-13 11:51     ` Vladimir Sementsov-Ogievskiy
2026-07-13 13:29       ` Markus Armbruster
2026-07-13 15:08         ` Vladimir Sementsov-Ogievskiy
2026-07-14 13:19           ` Michael S. Tsirkin
2026-07-14 14:30             ` Vladimir Sementsov-Ogievskiy
2026-07-13 11:17   ` Daniel P. Berrangé
2026-07-13 12:35     ` Vladimir Sementsov-Ogievskiy
2026-07-13 15:05       ` Daniel P. Berrangé
2026-07-13 15:19         ` Vladimir Sementsov-Ogievskiy
2026-07-13 19:36   ` Michael S. Tsirkin
2026-07-14  6:43     ` Vladimir Sementsov-Ogievskiy
2026-07-10 19:18 ` [PATCH v18 13/14] tests/functional: add skipWithoutSudo() decorator Vladimir Sementsov-Ogievskiy
2026-07-10 19:18 ` [PATCH v18 14/14] tests/functional: add test_tap_migration Vladimir Sementsov-Ogievskiy

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=alUwflog7Xd34Vd4@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bchaney@akamai.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=jasowang@redhat.com \
    --cc=mark.caveayland@nutanix.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael.s.norwitz@gmail.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=yc-core@yandex-team.ru \
    /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.