public inbox for virtio-fs@lists.linux.dev
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
Cc: qemu-devel@nongnu.org, "Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Zhenwei Pi" <pizhenwei@bytedance.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Stefano Garzarella" <sgarzare@redhat.com>,
	"Raphael Norwitz" <raphael@enfabrica.net>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	mzamazal@redhat.com, "Peter Xu" <peterx@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	qemu-block@nongnu.org, virtio-fs@lists.linux.dev,
	"yc-core@yandex-team.ru" <yc-core@yandex-team.ru>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v5 5/5] vhost-user-blk: support inter-host inflight migration
Date: Mon, 12 Jan 2026 13:19:17 -0500	[thread overview]
Message-ID: <20260112181917.GE462084@fedora> (raw)
In-Reply-To: <20260112114503.1174330-6-dtalexundeer@yandex-team.ru>

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

On Mon, Jan 12, 2026 at 04:45:03PM +0500, Alexandr Moshkov wrote:
> 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, with feature flag the vhost-user
> back-end can immediately stop vrings, so all in-flight requests will be
> migrated to another host.
> 
> Signed-off-by: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
> ---
>  hw/block/vhost-user-blk.c          | 28 ++++++++++++++++++++++++++++
>  include/hw/virtio/vhost-user-blk.h |  1 +
>  2 files changed, 29 insertions(+)
> 
> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> index a8fd90480a..5e44f6253c 100644
> --- a/hw/block/vhost-user-blk.c
> +++ b/hw/block/vhost-user-blk.c
> @@ -656,6 +656,28 @@ static struct vhost_dev *vhost_user_blk_get_vhost(VirtIODevice *vdev)
>      return &s->dev;
>  }
>  
> +static bool vhost_user_blk_inflight_needed(void *opaque)
> +{
> +    struct VHostUserBlk *s = opaque;
> +
> +    bool inflight_drain = vhost_dev_has_feature(&s->dev,
> +                        VHOST_USER_PROTOCOL_F_GET_VRING_BASE_INFLIGHT);

VHOST_USER_PROTOCOL_F_GET_VRING_BASE_INFLIGHT must only be negotiated
when inflight_migration is enabled. Otherwise the backend will use this
feature even though vhost_user_blk_inflight_needed() skips migrating the
in-flight region.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-01-12 18:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 11:44 [PATCH v5 0/5] support inflight migration Alexandr Moshkov
2026-01-12 11:44 ` [PATCH v5 1/5] vhost-user.rst: specify vhost-user back-end action on GET_VRING_BASE Alexandr Moshkov
2026-01-12 11:45 ` [PATCH v5 2/5] vhost-user: introduce protocol feature for skip drain " Alexandr Moshkov
2026-01-12 18:08   ` Stefan Hajnoczi
2026-01-12 11:45 ` [PATCH v5 3/5] vmstate: introduce VMSTATE_VBUFFER_UINT64 Alexandr Moshkov
2026-01-12 11:45 ` [PATCH v5 4/5] vhost: add vmstate for inflight region with inner buffer Alexandr Moshkov
2026-01-12 18:22   ` Stefan Hajnoczi
2026-01-12 11:45 ` [PATCH v5 5/5] vhost-user-blk: support inter-host inflight migration Alexandr Moshkov
2026-01-12 18:19   ` Stefan Hajnoczi [this message]
2026-01-13  6:49     ` Alexandr Moshkov

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=20260112181917.GE462084@fedora \
    --to=stefanha@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=dtalexundeer@yandex-team.ru \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=mzamazal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael@enfabrica.net \
    --cc=sgarzare@redhat.com \
    --cc=virtio-fs@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox