From: "Michael S. Tsirkin" <mst@redhat.com>
To: Yajun Wu <yajunw@nvidia.com>
Cc: "Stefano Garzarella" <sgarzare@redhat.com>,
"fengli@smartx.com" <fengli@smartx.com>,
"raphael.norwitz@nutanix.com" <raphael.norwitz@nutanix.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Parav Pandit" <parav@nvidia.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: vhost-user-blk reconnect issue
Date: Mon, 1 Apr 2024 03:54:11 -0400 [thread overview]
Message-ID: <20240401035350-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <add17160-7b47-4af0-908c-9c0617720cc2@nvidia.com>
On Mon, Apr 01, 2024 at 10:08:10AM +0800, Yajun Wu wrote:
>
> On 3/27/2024 6:47 PM, Stefano Garzarella wrote:
> > External email: Use caution opening links or attachments
> >
> >
> > Hi Yajun,
> >
> > On Mon, Mar 25, 2024 at 10:54:13AM +0000, Yajun Wu wrote:
> > > Hi experts,
> > >
> > > With latest QEMU (8.2.90), we find two vhost-user-blk backend reconnect
> > > failure scenarios:
> > Do you know if has it ever worked and so it's a regression, or have we
> > always had this problem?
>
> I am afraid this commit: "71e076a07d (2022-12-01 02:30:13 -0500) hw/virtio:
> generalise CHR_EVENT_CLOSED handling" caused both failures. Previous hash
> is good.
CC Alex who wrote that commit.
> I suspect the "if (vhost->vdev)" in vhost_user_async_close_bh is the cause,
> previous code doesn't have this check?
>
> >
> > Thanks,
> > Stefano
> >
> > > 1. Disconnect vhost-user-blk backend before guest driver probe vblk device, then reconnect backend after guest driver probe device. QEMU won't send out any vhost messages to restore backend.
> > > This is because vhost->vdev is NULL before guest driver probe vblk device, so vhost_user_blk_disconnect won't be called, s->connected is still true. Next vhost_user_blk_connect will simply return without doing anything.
> > >
> > > 2. modprobe -r virtio-blk inside VM, then disconnect backend, then reconnect backend, then modprobe virtio-blk. QEMU won't send messages in vhost_dev_init.
> > > This is because rmmod will let qemu call vhost_user_blk_stop, vhost->vdev also become NULL(in vhost_dev_stop), vhost_user_blk_disconnect won't be called. Again s->connected is still true, even chr connect is closed.
> > >
> > > I think even vhost->vdev is NULL, vhost_user_blk_disconnect should be called when chr connect close?
> > > Hope we can have a fix soon.
> > >
> > >
> > > Thanks,
> > > Yajun
> > >
next prev parent reply other threads:[~2024-04-01 7:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 10:54 vhost-user-blk reconnect issue Yajun Wu
2024-03-27 10:47 ` Stefano Garzarella
2024-04-01 2:08 ` Yajun Wu
2024-04-01 7:54 ` Michael S. Tsirkin [this message]
2024-04-01 8:34 ` Li Feng
2024-04-01 8:43 ` Yajun Wu
2024-04-02 8:44 ` Li Feng
2024-04-10 7:51 ` Yajun Wu
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=20240401035350-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=fengli@smartx.com \
--cc=parav@nvidia.com \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=sgarzare@redhat.com \
--cc=yajunw@nvidia.com \
/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;
as well as URLs for NNTP newsgroup(s).