qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/6] virtio-net: initial iterative live migration support
@ 2025-07-22 12:41 Jonah Palmer
  2025-07-22 12:41 ` [RFC 1/6] migration: Add virtio-iterative capability Jonah Palmer
                   ` (6 more replies)
  0 siblings, 7 replies; 66+ messages in thread
From: Jonah Palmer @ 2025-07-22 12:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: peterx, farosas, eblake, armbru, jasowang, mst, si-wei.liu,
	eperezma, boris.ostrovsky, jonah.palmer

This series is an RFC initial implementation of iterative live
migration for virtio-net devices.

The main motivation behind implementing iterative migration for
virtio-net devices is to start on heavy, time-consuming operations
for the destination while the source is still active (i.e. before
the stop-and-copy phase).

The motivation behind this RFC series specifically is to provide an
initial framework for such an implementation and get feedback on the
design and direction.
-------

This implementation of iterative live migration for a virtio-net device
is enabled via setting the migration capability 'virtio-iterative' to
on for both the source & destination, e.g. (HMP):

(qemu) migrate_set_capability virtio-iterative on

The virtio-net device's SaveVMHandlers hooks are registered/unregistered
during the device's realize/unrealize phase.

Currently, this series only sends and loads the vmstate at the start of
migration. The vmstate is still sent (again) during the stop-and-copy
phase, as it is today, to handle any deltas in the state since it was
initially sent. A future patch in this series could avoid having to
re-send and re-load the entire state again and instead focus only on the
deltas.

There is a slight, modest improvement in guest-visible downtime from
this series. More specifically, when using iterative live migration with
a virtio-net device, the downtime contributed by migrating a virtio-net
device decreased from ~3.2ms to ~1.4ms on average:

Before:
-------
vmstate_downtime_load type=non-iterable idstr=0000:00:03.0/virtio-net
  instance_id=0 downtime=3594

After:
------
vmstate_downtime_load type=non-iterable idstr=0000:00:03.0/virtio-net
  instance_id=0 downtime=1607

This slight improvement is likely due to the initial vmstate_load_state
call "warming up" pages in memory such that, when it's called a second
time during the stop-and-copy phase, allocation and page-fault latencies
are reduced.
-------

Comments, suggestions, etc. are welcome here.

Jonah Palmer (6):
  migration: Add virtio-iterative capability
  virtio-net: Reorder vmstate_virtio_net and helpers
  virtio-net: Add SaveVMHandlers for iterative migration
  virtio-net: iter live migration - migrate vmstate
  virtio,virtio-net: skip consistency check in virtio_load for iterative
    migration
  virtio-net: skip vhost_started assertion during iterative migration

 hw/net/virtio-net.c            | 246 +++++++++++++++++++++++++++------
 hw/virtio/virtio.c             |  32 +++--
 include/hw/virtio/virtio-net.h |   8 ++
 include/hw/virtio/virtio.h     |   7 +
 migration/savevm.c             |   1 +
 qapi/migration.json            |   7 +-
 6 files changed, 247 insertions(+), 54 deletions(-)

-- 
2.47.1



^ permalink raw reply	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2025-09-02  7:32 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 12:41 [RFC 0/6] virtio-net: initial iterative live migration support Jonah Palmer
2025-07-22 12:41 ` [RFC 1/6] migration: Add virtio-iterative capability Jonah Palmer
2025-08-06 15:58   ` Peter Xu
2025-08-07 12:50     ` Jonah Palmer
2025-08-07 13:13       ` Peter Xu
2025-08-07 14:20         ` Jonah Palmer
2025-08-08 10:48   ` Markus Armbruster
2025-08-11 12:18     ` Jonah Palmer
2025-08-25 12:44       ` Markus Armbruster
2025-08-25 14:57         ` Jonah Palmer
2025-08-26  6:11           ` Markus Armbruster
2025-08-26 18:08             ` Jonah Palmer
2025-08-27  6:37               ` Markus Armbruster
2025-08-28 15:29                 ` Jonah Palmer
2025-08-29  9:24                   ` Markus Armbruster
2025-09-01 14:10                     ` Jonah Palmer
2025-07-22 12:41 ` [RFC 2/6] virtio-net: Reorder vmstate_virtio_net and helpers Jonah Palmer
2025-07-22 12:41 ` [RFC 3/6] virtio-net: Add SaveVMHandlers for iterative migration Jonah Palmer
2025-07-22 12:41 ` [RFC 4/6] virtio-net: iter live migration - migrate vmstate Jonah Palmer
2025-07-23  6:51   ` Michael S. Tsirkin
2025-07-24 14:45     ` Jonah Palmer
2025-07-25  9:31       ` Michael S. Tsirkin
2025-07-28 12:30         ` Jonah Palmer
2025-07-22 12:41 ` [RFC 5/6] virtio, virtio-net: skip consistency check in virtio_load for iterative migration Jonah Palmer via
2025-07-28 15:30   ` [RFC 5/6] virtio,virtio-net: " Eugenio Perez Martin
2025-07-28 16:23     ` Jonah Palmer
2025-07-30  8:59       ` Eugenio Perez Martin
2025-08-06 16:27   ` Peter Xu
2025-08-07 14:18     ` Jonah Palmer
2025-08-07 16:31       ` Peter Xu
2025-08-11 12:30         ` Jonah Palmer
2025-08-11 13:39           ` Peter Xu
2025-08-11 21:26             ` Jonah Palmer
2025-08-11 21:55               ` Peter Xu
2025-08-12 15:51                 ` Jonah Palmer
2025-08-13  9:25                 ` Eugenio Perez Martin
2025-08-13 14:06                   ` Peter Xu
2025-08-14  9:28                     ` Eugenio Perez Martin
2025-08-14 16:16                       ` Dragos Tatulea
2025-08-14 20:27                       ` Peter Xu
2025-08-15 14:50                       ` Jonah Palmer
2025-08-15 19:35                         ` Si-Wei Liu
2025-08-18  6:51                         ` Eugenio Perez Martin
2025-08-18 14:46                           ` Jonah Palmer
2025-08-18 16:21                             ` Peter Xu
2025-08-19  7:20                               ` Eugenio Perez Martin
2025-08-19  7:10                             ` Eugenio Perez Martin
2025-08-19 15:10                               ` Jonah Palmer
2025-08-20  7:59                                 ` Eugenio Perez Martin
2025-08-25 12:16                                   ` Jonah Palmer
2025-08-27 16:55                                   ` Jonah Palmer
2025-09-01  6:57                                     ` Eugenio Perez Martin
2025-09-01 13:17                                       ` Jonah Palmer
2025-09-02  7:31                                         ` Eugenio Perez Martin
2025-07-22 12:41 ` [RFC 6/6] virtio-net: skip vhost_started assertion during " Jonah Palmer
2025-07-23  5:51 ` [RFC 0/6] virtio-net: initial iterative live migration support Jason Wang
2025-07-24 21:59   ` Jonah Palmer
2025-07-25  9:18     ` Lei Yang
2025-07-25  9:33     ` Michael S. Tsirkin
2025-07-28  7:09       ` Jason Wang
2025-07-28  7:35         ` Jason Wang
2025-07-28 12:41           ` Jonah Palmer
2025-07-28 14:51           ` Eugenio Perez Martin
2025-07-28 15:38             ` Eugenio Perez Martin
2025-07-29  2:38             ` Jason Wang
2025-07-29 12:41               ` Jonah Palmer

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).