Development discussions about virtio-fs
 help / color / mirror / Atom feed
From: Raphael Norwitz <rnorwitz@nvidia.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Alexandr Moshkov" <dtalexundeer@yandex-team.ru>,
	qemu-devel@nongnu.org, "Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Milan Zamazal" <mzamazal@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-block@nongnu.org, "Fam Zheng" <fam@euphon.net>,
	"zhenwei pi" <zhenwei.pi@linux.dev>,
	"Hanna Reitz" <hreitz@redhat.com>,
	virtio-fs@lists.linux.dev,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Stefano Garzarella" <sgarzare@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"yc-core@yandex-team.ru" <yc-core@yandex-team.ru>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>
Subject: Re: [PATCH v3 5/5] vhost-user: add skip_drain param to GET_VRING_BASE
Date: Tue, 26 May 2026 19:51:02 -0400	[thread overview]
Message-ID: <cc805bc1-a623-413d-bae8-508ab8ef0c8f@nvidia.com> (raw)
In-Reply-To: <20260526184855.GA1762453@fedora>



On 5/26/26 2:48 PM, Stefan Hajnoczi wrote:
> On Mon, May 25, 2026 at 05:34:37PM -0400, Raphael Norwitz wrote:
>> Apologies for the late reply.
>>
>> On 5/12/26 1:55 AM, Alexandr Moshkov wrote:
>>> Gentle ping :)
>>>
>>
>> [...]
>>
>>>>>>> On 4/16/26 5:26 AM, Alexandr Moshkov wrote:
>>>>>>>> Greetings! Thanks for reply!
>>>>>>>>
>>>>>>>>
>>>>>>>> On 4/15/26 20:21, Raphael Norwitz wrote:
>>>>>>>>> I’m not sure I like using the num field in
>>>>>>>>> vhost_vring_state to set magic values which
>>>>>>>>> affect protocol behavior for GET_VRING_BASE. It
>>>>>>>>> feels like a hack to me. I would think the
>>>>>>>>> proper solution if we want to support migration
>>>>>>>>> from new to old would be to have new use a
>>>>>>>>> different new message entirely. Can we do that?
>>>>>>>>
>>>>>>>> I think we can, but I thought at first that this
>>>>>>>> will be almost a complete copy of GET_VRING_BASE
>>>>>>>> message, with the exception of waiting for drain of
>>>>>>>> requests, so I choose to expand existing message.
>>>>>>>>
>>>>>>>
>>>>>>> I think a new message would be cleaner. Anyone else have thoughts?
>>>>>>>
>>>>>>>> If this is not an appropriate approach, is it better
>>>>>>>> to make a new message like GET_VRING_BASE or a
>>>>>>>> separate message used together with default
>>>>>>>> GET_VRING_BASE message (for example, message for
>>>>>>>> setting some kind of status on the server)? What
>>>>>>>> should I name this new message?
>>>>>>>>
>>>>>>>
>>>>>>> Maybe GET_VRING_BASE_SKIP_DRAIN? How would a separate
>>>>>>> message used together with default GET_VRING_BASE
>>>>>>> message work?
>>>>>>
>>>>>> I was thinking about a message something like
>>>>>> SET_VRING_ENABLE - for example SET_SKIP_DRAIN_ENABLE, that
>>>>>> would enable/disable some state (skip_drain) in the backend.
>>>>>
>>>>> I'd need to see the flow in more detail but sounds promising.
>>>>
>>>> On migration vhost-user-blk firstly send SET_SKIP_DRAIN_ENABLE with
>>>> num = 1 message if `inflight-migration` device parameter
>>>> and VHOST_USER_PROTOCOL_F_GET_VRING_BASE_INFLIGHT enabled. Then send
>>>> GET_VRING_BASE and continue work as usual.
>>>>
>>>> On SET_SKIP_DRAIN_ENABLE backend sets inner state (skip_drain) so
>>>> when GET_VRING_BASE is called and skip_drain is true the drain will
>>>> skipped.
>>>>
>>>> What do you think?
>>>>
>>
>> I'm happy with that in theory but would like more clarity on the details. In
>> particular, I'm not sure what you mean by "vhost-user-blk firstly send
>> SET_SKIP_DRAIN_ENABLE". To add a new message I would think we would have to
>> do a vhost-user protocol feature negotiation to gate it.
>>
>> Also what are the precise semantics for SET_SKIP_DRAIN_ENABLE? Would it be
>> sent on backend connect or when we're about to migrate?
>>
>> I was hoping others would comment but at this point I'd suggest drafting the
>> code and then we can re-review.
> 
> Adding a new GET_VRING_BASE_SKIP_DRAIN message seems simpler to me than
> a stateful SET_SKIP_DRAIN_ENABLE where the back-end needs to stash the
> enable_skip_drain state and the front-end would have to toggle the state
> if it switches between skip drain and classic behavior.

Agreed - that sounds cleaner.


> 
> Stefan


  reply	other threads:[~2026-05-26 23:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30  9:52 [PATCH v3 0/5] vhost-user-blk: fix compatibility with older qemu versions Alexandr Moshkov
2026-03-30  9:52 ` [PATCH v3 1/5] vhost-user.rst: fix typo Alexandr Moshkov
2026-04-15 15:22   ` Raphael Norwitz
2026-03-30  9:52 ` [PATCH v3 2/5] vhost-user-blk: make inflight-migration prop mutable Alexandr Moshkov
2026-04-15 15:23   ` Raphael Norwitz
2026-03-30  9:52 ` [PATCH v3 3/5] vhost-user: add skip_drain param to do_vhost_virtqueue_stop Alexandr Moshkov
2026-03-30  9:52 ` [PATCH v3 4/5] vhost-user-blk: move inflight_needed higher Alexandr Moshkov
2026-03-30  9:52 ` [PATCH v3 5/5] vhost-user: add skip_drain param to GET_VRING_BASE Alexandr Moshkov
2026-04-15 15:21   ` Raphael Norwitz
     [not found]     ` <965db8ae-b44a-4b29-b006-56e8474d52b5@yandex-team.ru>
2026-04-23 14:15       ` Raphael Norwitz
2026-04-24  8:57         ` Alexandr Moshkov
2026-04-24 12:52           ` Raphael Norwitz
2026-04-27 11:15             ` Alexandr Moshkov
2026-05-12  5:55               ` Alexandr Moshkov
2026-05-25 21:34                 ` Raphael Norwitz
2026-05-26 18:48                   ` Stefan Hajnoczi
2026-05-26 23:51                     ` Raphael Norwitz [this message]
2026-04-06  9:51 ` [PATCH v3 0/5] vhost-user-blk: fix compatibility with older qemu versions Alexandr Moshkov
2026-04-13 11:19   ` Alexandr Moshkov
2026-04-20 11:11   ` Alexandr Moshkov
2026-05-04  6:56     ` 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=cc805bc1-a623-413d-bae8-508ab8ef0c8f@nvidia.com \
    --to=rnorwitz@nvidia.com \
    --cc=alex.bennee@linaro.org \
    --cc=arei.gonglei@huawei.com \
    --cc=dtalexundeer@yandex-team.ru \
    --cc=fam@euphon.net \
    --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=pierrick.bouvier@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-fs@lists.linux.dev \
    --cc=vsementsov@yandex-team.ru \
    --cc=yc-core@yandex-team.ru \
    --cc=zhenwei.pi@linux.dev \
    /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