qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] vhost-user-blk: support inflight migration
@ 2025-11-10 10:39 Alexandr Moshkov
  2025-11-10 10:39 ` [PATCH v3 1/3] vmstate: introduce VMSTATE_VBUFFER_UINT64 Alexandr Moshkov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alexandr Moshkov @ 2025-11-10 10:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Raphael Norwitz, Michael S. Tsirkin, Stefano Garzarella,
	Kevin Wolf, Hanna Reitz, Peter Xu, Fabiano Rosas, Eric Blake,
	Markus Armbruster, Alexandr Moshkov

v3:
- use pre_load_errp instead of pre_load in vhost.c
- change vhost-user-blk property to
  "skip-get-vring-base-inflight-migration"
- refactor vhost-user-blk.c, by moving vhost_user_blk_inflight_needed() higher

v2:
- rewrite migration using VMSD instead of qemufile API
- add vhost-user-blk parameter instead of migration capability

I don't know if VMSD was used cleanly in migration implementation, so
feel free for comments.

Based on Vladimir's work:
[PATCH v2 00/25] vhost-user-blk: live-backend local migration
  which was based on:
    - [PATCH v4 0/7] chardev: postpone connect
      (which in turn is based on [PATCH 0/2] remove deprecated 'reconnect' options)
    - [PATCH v3 00/23] vhost refactoring and fixes
    - [PATCH v8 14/19] migration: introduce .pre_incoming() vmsd handler

Based-on: <20250924133309.334631-1-vsementsov@yandex-team.ru>
Based-on: <20251015212051.1156334-1-vsementsov@yandex-team.ru>
Based-on: <20251015145808.1112843-1-vsementsov@yandex-team.ru>
Based-on: <20251015132136.1083972-15-vsementsov@yandex-team.ru>
Based-on: <20251016114104.1384675-1-vsementsov@yandex-team.ru>

--- 

Hi!

During inter-host migration, waiting for disk requests to be drained
in the vhost-user backend can incur significant downtime.

This can be avoided if QEMU migrates the inflight region in vhost-user-blk. 
Thus, during the qemu migration, the vhost-user backend can cancel all inflight requests and
then, after migration, they will be executed on another host. 

At first, I tried to implement migration for all vhost-user devices that support inflight at once, 
but this would require a lot of changes both in vhost-user-blk (to transfer it to the base class) and 
in the vhost-user-base base class (inflight implementation and remodeling + a large refactor).

Therefore, for now I decided to leave this idea for later and 
implement the migration of the inflight region first for vhost-user-blk.

Alexandr Moshkov (3):
  vmstate: introduce VMSTATE_VBUFFER_UINT64
  vhost: add vmstate for inflight region with inner buffer
  vhost-user-blk: support inter-host inflight migration

 hw/block/vhost-user-blk.c          | 29 +++++++++++++++++++++
 hw/virtio/vhost.c                  | 42 ++++++++++++++++++++++++++++++
 include/hw/virtio/vhost-user-blk.h |  1 +
 include/hw/virtio/vhost.h          |  6 +++++
 include/migration/vmstate.h        | 10 +++++++
 5 files changed, 88 insertions(+)

-- 
2.34.1



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

end of thread, other threads:[~2025-11-18 22:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 10:39 [PATCH v3 0/3] vhost-user-blk: support inflight migration Alexandr Moshkov
2025-11-10 10:39 ` [PATCH v3 1/3] vmstate: introduce VMSTATE_VBUFFER_UINT64 Alexandr Moshkov
2025-11-10 10:39 ` [PATCH v3 2/3] vhost: add vmstate for inflight region with inner buffer Alexandr Moshkov
2025-11-10 10:39 ` [PATCH v3 3/3] vhost-user-blk: support inter-host inflight migration Alexandr Moshkov
2025-11-18 20:24 ` [PATCH v3 0/3] vhost-user-blk: support " Vladimir Sementsov-Ogievskiy
2025-11-18 22:05   ` Peter Xu

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