* [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case
@ 2023-01-19 17:24 Greg Kurz
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Greg Kurz @ 2023-01-19 17:24 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Maxime Coquelin,
Laurent Vivier, Michael S. Tsirkin, Yajun Wu, Peter Maydell,
Parav Pandit, qemu-stable, Greg Kurz
The nested event loop was introduced in QEMU 6.0 to allow servicing
of requests coming from the slave channel while waiting for an ack
from the back-end on the master socket. It turns out this is fragile
and breaks if the servicing of the slave channel causes a new message
to be sent on the master socket. This is exactly what happens when
using DPDK as reported in [0].
The only identified user for the nested loop is DAX enablement that
isn't upstream yet. Just drop the code for now. Some more clever
solution should be designed when the need to service concurrent
requests from both channels arises again.
Greg Kurz (2):
Revert "vhost-user: Monitor slave channel in vhost_user_read()"
Revert "vhost-user: Introduce nested event loop in vhost_user_read()"
hw/virtio/vhost-user.c | 100 ++++-------------------------------------
1 file changed, 8 insertions(+), 92 deletions(-)
--
2.39.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"
2023-01-19 17:24 [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
@ 2023-01-19 17:24 ` Greg Kurz
2023-01-19 18:39 ` Greg Kurz
` (2 more replies)
2023-01-19 17:24 ` [PATCH 2/2] Revert "vhost-user: Introduce nested event loop " Greg Kurz
2023-01-23 8:21 ` [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
2 siblings, 3 replies; 8+ messages in thread
From: Greg Kurz @ 2023-01-19 17:24 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Maxime Coquelin,
Laurent Vivier, Michael S. Tsirkin, Yajun Wu, Peter Maydell,
Parav Pandit, qemu-stable, Greg Kurz, Yanghang Liu
This reverts commit db8a3772e300c1a656331a92da0785d81667dc81.
Motivation : this is breaking vhost-user with DPDK as reported in [0].
Received unexpected msg type. Expected 22 received 40
Fail to update device iotlb
Received unexpected msg type. Expected 40 received 22
Received unexpected msg type. Expected 22 received 11
Fail to update device iotlb
Received unexpected msg type. Expected 11 received 22
vhost VQ 1 ring restore failed: -71: Protocol error (71)
Received unexpected msg type. Expected 22 received 11
Fail to update device iotlb
Received unexpected msg type. Expected 11 received 22
vhost VQ 0 ring restore failed: -71: Protocol error (71)
unable to start vhost net: 71: falling back on userspace virtio
The failing sequence that leads to the first error is :
- QEMU sends a VHOST_USER_GET_STATUS (40) request to DPDK on the master
socket
- QEMU starts a nested event loop in order to wait for the
VHOST_USER_GET_STATUS response and to be able to process messages from
the slave channel
- DPDK sends a couple of legitimate IOTLB miss messages on the slave
channel
- QEMU processes each IOTLB request and sends VHOST_USER_IOTLB_MSG (22)
updates on the master socket
- QEMU assumes to receive a response for the latest VHOST_USER_IOTLB_MSG
but it gets the response for the VHOST_USER_GET_STATUS instead
The subsequent errors have the same root cause : the nested event loop
breaks the order by design. It lures QEMU to expect responses to the
latest message sent on the master socket to arrive first.
Since this was only needed for DAX enablement which is still not merged
upstream, just drop the code for now. A working solution will have to
be merged later on. Likely protect the master socket with a mutex
and service the slave channel with a separate thread, as discussed with
Maxime in the mail thread below.
[0] https://lore.kernel.org/qemu-devel/43145ede-89dc-280e-b953-6a2b436de395@redhat.com/
Reported-by: Yanghang Liu <yanghliu@redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2155173
Signed-off-by: Greg Kurz <groug@kaod.org>
---
hw/virtio/vhost-user.c | 35 +++--------------------------------
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index d9ce0501b2c7..7fb78af22c56 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -356,35 +356,6 @@ end:
return G_SOURCE_REMOVE;
}
-static gboolean slave_read(QIOChannel *ioc, GIOCondition condition,
- gpointer opaque);
-
-/*
- * This updates the read handler to use a new event loop context.
- * Event sources are removed from the previous context : this ensures
- * that events detected in the previous context are purged. They will
- * be re-detected and processed in the new context.
- */
-static void slave_update_read_handler(struct vhost_dev *dev,
- GMainContext *ctxt)
-{
- struct vhost_user *u = dev->opaque;
-
- if (!u->slave_ioc) {
- return;
- }
-
- if (u->slave_src) {
- g_source_destroy(u->slave_src);
- g_source_unref(u->slave_src);
- }
-
- u->slave_src = qio_channel_add_watch_source(u->slave_ioc,
- G_IO_IN | G_IO_HUP,
- slave_read, dev, NULL,
- ctxt);
-}
-
static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
{
struct vhost_user *u = dev->opaque;
@@ -406,7 +377,6 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
* be prepared for re-entrancy. So we create a new one and switch chr
* to use it.
*/
- slave_update_read_handler(dev, ctxt);
qemu_chr_be_update_read_handlers(chr->chr, ctxt);
qemu_chr_fe_add_watch(chr, G_IO_IN | G_IO_HUP, vhost_user_read_cb, &data);
@@ -418,7 +388,6 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
* context that have been processed by the nested loop are purged.
*/
qemu_chr_be_update_read_handlers(chr->chr, prev_ctxt);
- slave_update_read_handler(dev, NULL);
g_main_loop_unref(loop);
g_main_context_unref(ctxt);
@@ -1807,7 +1776,9 @@ static int vhost_setup_slave_channel(struct vhost_dev *dev)
return -ECONNREFUSED;
}
u->slave_ioc = ioc;
- slave_update_read_handler(dev, NULL);
+ u->slave_src = qio_channel_add_watch_source(u->slave_ioc,
+ G_IO_IN | G_IO_HUP,
+ slave_read, dev, NULL, NULL);
if (reply_supported) {
msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK;
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"
2023-01-19 17:24 [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
@ 2023-01-19 17:24 ` Greg Kurz
2023-01-20 15:13 ` Maxime Coquelin
2023-01-23 8:21 ` [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
2 siblings, 1 reply; 8+ messages in thread
From: Greg Kurz @ 2023-01-19 17:24 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Maxime Coquelin,
Laurent Vivier, Michael S. Tsirkin, Yajun Wu, Peter Maydell,
Parav Pandit, qemu-stable, Greg Kurz
This reverts commit a7f523c7d114d445c5d83aecdba3efc038e5a692.
The nested event loop is broken by design. It's only user was removed.
Drop the code as well so that nobody ever tries to use it again.
I had to fix a couple of trivial conflicts around return values because
of 025faa872bcf ("vhost-user: stick to -errno error return convention").
Signed-off-by: Greg Kurz <groug@kaod.org>
---
hw/virtio/vhost-user.c | 65 ++++--------------------------------------
1 file changed, 5 insertions(+), 60 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 7fb78af22c56..e14895c919ef 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -305,19 +305,8 @@ static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg)
return 0;
}
-struct vhost_user_read_cb_data {
- struct vhost_dev *dev;
- VhostUserMsg *msg;
- GMainLoop *loop;
- int ret;
-};
-
-static gboolean vhost_user_read_cb(void *do_not_use, GIOCondition condition,
- gpointer opaque)
+static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
{
- struct vhost_user_read_cb_data *data = opaque;
- struct vhost_dev *dev = data->dev;
- VhostUserMsg *msg = data->msg;
struct vhost_user *u = dev->opaque;
CharBackend *chr = u->user->chr;
uint8_t *p = (uint8_t *) msg;
@@ -325,8 +314,7 @@ static gboolean vhost_user_read_cb(void *do_not_use, GIOCondition condition,
r = vhost_user_read_header(dev, msg);
if (r < 0) {
- data->ret = r;
- goto end;
+ return r;
}
/* validate message size is sane */
@@ -334,8 +322,7 @@ static gboolean vhost_user_read_cb(void *do_not_use, GIOCondition condition,
error_report("Failed to read msg header."
" Size %d exceeds the maximum %zu.", msg->hdr.size,
VHOST_USER_PAYLOAD_SIZE);
- data->ret = -EPROTO;
- goto end;
+ return -EPROTO;
}
if (msg->hdr.size) {
@@ -346,53 +333,11 @@ static gboolean vhost_user_read_cb(void *do_not_use, GIOCondition condition,
int saved_errno = errno;
error_report("Failed to read msg payload."
" Read %d instead of %d.", r, msg->hdr.size);
- data->ret = r < 0 ? -saved_errno : -EIO;
- goto end;
+ return r < 0 ? -saved_errno : -EIO;
}
}
-end:
- g_main_loop_quit(data->loop);
- return G_SOURCE_REMOVE;
-}
-
-static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
-{
- struct vhost_user *u = dev->opaque;
- CharBackend *chr = u->user->chr;
- GMainContext *prev_ctxt = chr->chr->gcontext;
- GMainContext *ctxt = g_main_context_new();
- GMainLoop *loop = g_main_loop_new(ctxt, FALSE);
- struct vhost_user_read_cb_data data = {
- .dev = dev,
- .loop = loop,
- .msg = msg,
- .ret = 0
- };
-
- /*
- * We want to be able to monitor the slave channel fd while waiting
- * for chr I/O. This requires an event loop, but we can't nest the
- * one to which chr is currently attached : its fd handlers might not
- * be prepared for re-entrancy. So we create a new one and switch chr
- * to use it.
- */
- qemu_chr_be_update_read_handlers(chr->chr, ctxt);
- qemu_chr_fe_add_watch(chr, G_IO_IN | G_IO_HUP, vhost_user_read_cb, &data);
-
- g_main_loop_run(loop);
-
- /*
- * Restore the previous event loop context. This also destroys/recreates
- * event sources : this guarantees that all pending events in the original
- * context that have been processed by the nested loop are purged.
- */
- qemu_chr_be_update_read_handlers(chr->chr, prev_ctxt);
-
- g_main_loop_unref(loop);
- g_main_context_unref(ctxt);
-
- return data.ret;
+ return 0;
}
static int process_message_reply(struct vhost_dev *dev,
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
@ 2023-01-19 18:39 ` Greg Kurz
2023-01-19 21:10 ` Stefan Hajnoczi
2023-01-20 15:03 ` Maxime Coquelin
2 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2023-01-19 18:39 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Maxime Coquelin,
Laurent Vivier, Michael S. Tsirkin, Yajun Wu, Peter Maydell,
Parav Pandit, qemu-stable, Yanghang Liu
For some reason, the cover letter didn't make it, even though
git publish reported it was sent. I'll repost tomorrow if it
is still missing (or possibly craft a message manually with
the appropriate id if I find time).
Sorry for the inconvenience.
Cheers,
--
Greg
On Thu, 19 Jan 2023 18:24:23 +0100
Greg Kurz <groug@kaod.org> wrote:
> This reverts commit db8a3772e300c1a656331a92da0785d81667dc81.
>
> Motivation : this is breaking vhost-user with DPDK as reported in [0].
>
> Received unexpected msg type. Expected 22 received 40
> Fail to update device iotlb
> Received unexpected msg type. Expected 40 received 22
> Received unexpected msg type. Expected 22 received 11
> Fail to update device iotlb
> Received unexpected msg type. Expected 11 received 22
> vhost VQ 1 ring restore failed: -71: Protocol error (71)
> Received unexpected msg type. Expected 22 received 11
> Fail to update device iotlb
> Received unexpected msg type. Expected 11 received 22
> vhost VQ 0 ring restore failed: -71: Protocol error (71)
> unable to start vhost net: 71: falling back on userspace virtio
>
> The failing sequence that leads to the first error is :
> - QEMU sends a VHOST_USER_GET_STATUS (40) request to DPDK on the master
> socket
> - QEMU starts a nested event loop in order to wait for the
> VHOST_USER_GET_STATUS response and to be able to process messages from
> the slave channel
> - DPDK sends a couple of legitimate IOTLB miss messages on the slave
> channel
> - QEMU processes each IOTLB request and sends VHOST_USER_IOTLB_MSG (22)
> updates on the master socket
> - QEMU assumes to receive a response for the latest VHOST_USER_IOTLB_MSG
> but it gets the response for the VHOST_USER_GET_STATUS instead
>
> The subsequent errors have the same root cause : the nested event loop
> breaks the order by design. It lures QEMU to expect responses to the
> latest message sent on the master socket to arrive first.
>
> Since this was only needed for DAX enablement which is still not merged
> upstream, just drop the code for now. A working solution will have to
> be merged later on. Likely protect the master socket with a mutex
> and service the slave channel with a separate thread, as discussed with
> Maxime in the mail thread below.
>
> [0] https://lore.kernel.org/qemu-devel/43145ede-89dc-280e-b953-6a2b436de395@redhat.com/
>
> Reported-by: Yanghang Liu <yanghliu@redhat.com>
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2155173
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/virtio/vhost-user.c | 35 +++--------------------------------
> 1 file changed, 3 insertions(+), 32 deletions(-)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index d9ce0501b2c7..7fb78af22c56 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -356,35 +356,6 @@ end:
> return G_SOURCE_REMOVE;
> }
>
> -static gboolean slave_read(QIOChannel *ioc, GIOCondition condition,
> - gpointer opaque);
> -
> -/*
> - * This updates the read handler to use a new event loop context.
> - * Event sources are removed from the previous context : this ensures
> - * that events detected in the previous context are purged. They will
> - * be re-detected and processed in the new context.
> - */
> -static void slave_update_read_handler(struct vhost_dev *dev,
> - GMainContext *ctxt)
> -{
> - struct vhost_user *u = dev->opaque;
> -
> - if (!u->slave_ioc) {
> - return;
> - }
> -
> - if (u->slave_src) {
> - g_source_destroy(u->slave_src);
> - g_source_unref(u->slave_src);
> - }
> -
> - u->slave_src = qio_channel_add_watch_source(u->slave_ioc,
> - G_IO_IN | G_IO_HUP,
> - slave_read, dev, NULL,
> - ctxt);
> -}
> -
> static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
> {
> struct vhost_user *u = dev->opaque;
> @@ -406,7 +377,6 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
> * be prepared for re-entrancy. So we create a new one and switch chr
> * to use it.
> */
> - slave_update_read_handler(dev, ctxt);
> qemu_chr_be_update_read_handlers(chr->chr, ctxt);
> qemu_chr_fe_add_watch(chr, G_IO_IN | G_IO_HUP, vhost_user_read_cb, &data);
>
> @@ -418,7 +388,6 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
> * context that have been processed by the nested loop are purged.
> */
> qemu_chr_be_update_read_handlers(chr->chr, prev_ctxt);
> - slave_update_read_handler(dev, NULL);
>
> g_main_loop_unref(loop);
> g_main_context_unref(ctxt);
> @@ -1807,7 +1776,9 @@ static int vhost_setup_slave_channel(struct vhost_dev *dev)
> return -ECONNREFUSED;
> }
> u->slave_ioc = ioc;
> - slave_update_read_handler(dev, NULL);
> + u->slave_src = qio_channel_add_watch_source(u->slave_ioc,
> + G_IO_IN | G_IO_HUP,
> + slave_read, dev, NULL, NULL);
>
> if (reply_supported) {
> msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
2023-01-19 18:39 ` Greg Kurz
@ 2023-01-19 21:10 ` Stefan Hajnoczi
2023-01-20 15:03 ` Maxime Coquelin
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2023-01-19 21:10 UTC (permalink / raw)
To: Greg Kurz
Cc: qemu-devel, Stefan Hajnoczi, Dr. David Alan Gilbert,
Maxime Coquelin, Laurent Vivier, Michael S. Tsirkin, Yajun Wu,
Peter Maydell, Parav Pandit, qemu-stable, Yanghang Liu
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
2023-01-19 18:39 ` Greg Kurz
2023-01-19 21:10 ` Stefan Hajnoczi
@ 2023-01-20 15:03 ` Maxime Coquelin
2 siblings, 0 replies; 8+ messages in thread
From: Maxime Coquelin @ 2023-01-20 15:03 UTC (permalink / raw)
To: Greg Kurz, qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Laurent Vivier,
Michael S. Tsirkin, Yajun Wu, Peter Maydell, Parav Pandit,
qemu-stable, Yanghang Liu
On 1/19/23 18:24, Greg Kurz wrote:
> This reverts commit db8a3772e300c1a656331a92da0785d81667dc81.
>
> Motivation : this is breaking vhost-user with DPDK as reported in [0].
>
> Received unexpected msg type. Expected 22 received 40
> Fail to update device iotlb
> Received unexpected msg type. Expected 40 received 22
> Received unexpected msg type. Expected 22 received 11
> Fail to update device iotlb
> Received unexpected msg type. Expected 11 received 22
> vhost VQ 1 ring restore failed: -71: Protocol error (71)
> Received unexpected msg type. Expected 22 received 11
> Fail to update device iotlb
> Received unexpected msg type. Expected 11 received 22
> vhost VQ 0 ring restore failed: -71: Protocol error (71)
> unable to start vhost net: 71: falling back on userspace virtio
>
> The failing sequence that leads to the first error is :
> - QEMU sends a VHOST_USER_GET_STATUS (40) request to DPDK on the master
> socket
> - QEMU starts a nested event loop in order to wait for the
> VHOST_USER_GET_STATUS response and to be able to process messages from
> the slave channel
> - DPDK sends a couple of legitimate IOTLB miss messages on the slave
> channel
> - QEMU processes each IOTLB request and sends VHOST_USER_IOTLB_MSG (22)
> updates on the master socket
> - QEMU assumes to receive a response for the latest VHOST_USER_IOTLB_MSG
> but it gets the response for the VHOST_USER_GET_STATUS instead
>
> The subsequent errors have the same root cause : the nested event loop
> breaks the order by design. It lures QEMU to expect responses to the
> latest message sent on the master socket to arrive first.
>
> Since this was only needed for DAX enablement which is still not merged
> upstream, just drop the code for now. A working solution will have to
> be merged later on. Likely protect the master socket with a mutex
> and service the slave channel with a separate thread, as discussed with
> Maxime in the mail thread below.
>
> [0] https://lore.kernel.org/qemu-devel/43145ede-89dc-280e-b953-6a2b436de395@redhat.com/
>
> Reported-by: Yanghang Liu <yanghliu@redhat.com>
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2155173
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/virtio/vhost-user.c | 35 +++--------------------------------
> 1 file changed, 3 insertions(+), 32 deletions(-)
>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"
2023-01-19 17:24 ` [PATCH 2/2] Revert "vhost-user: Introduce nested event loop " Greg Kurz
@ 2023-01-20 15:13 ` Maxime Coquelin
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Coquelin @ 2023-01-20 15:13 UTC (permalink / raw)
To: Greg Kurz, qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Laurent Vivier,
Michael S. Tsirkin, Yajun Wu, Peter Maydell, Parav Pandit,
qemu-stable
On 1/19/23 18:24, Greg Kurz wrote:
> This reverts commit a7f523c7d114d445c5d83aecdba3efc038e5a692.
>
> The nested event loop is broken by design. It's only user was removed.
> Drop the code as well so that nobody ever tries to use it again.
>
> I had to fix a couple of trivial conflicts around return values because
> of 025faa872bcf ("vhost-user: stick to -errno error return convention").
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/virtio/vhost-user.c | 65 ++++--------------------------------------
> 1 file changed, 5 insertions(+), 60 deletions(-)
>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case
2023-01-19 17:24 [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
2023-01-19 17:24 ` [PATCH 2/2] Revert "vhost-user: Introduce nested event loop " Greg Kurz
@ 2023-01-23 8:21 ` Greg Kurz
2 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2023-01-23 8:21 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Dr. David Alan Gilbert, Maxime Coquelin,
Laurent Vivier, Michael S. Tsirkin, Yajun Wu, Peter Maydell,
Parav Pandit, qemu-stable
On Thu, 19 Jan 2023 18:24:22 +0100
Greg Kurz <groug@kaod.org> wrote:
> The nested event loop was introduced in QEMU 6.0 to allow servicing
> of requests coming from the slave channel while waiting for an ack
> from the back-end on the master socket. It turns out this is fragile
> and breaks if the servicing of the slave channel causes a new message
> to be sent on the master socket. This is exactly what happens when
> using DPDK as reported in [0].
>
> The only identified user for the nested loop is DAX enablement that
> isn't upstream yet. Just drop the code for now. Some more clever
> solution should be designed when the need to service concurrent
> requests from both channels arises again.
>
> Greg Kurz (2):
> Revert "vhost-user: Monitor slave channel in vhost_user_read()"
> Revert "vhost-user: Introduce nested event loop in vhost_user_read()"
>
> hw/virtio/vhost-user.c | 100 ++++-------------------------------------
> 1 file changed, 8 insertions(+), 92 deletions(-)
>
Hi Michael,
Can you please merge this series as you kindly proposed in [0] ?
This will help to fix [1] which is currently blocking downstream
testing.
Cheers,
--
Greg
[0] https://lore.kernel.org/qemu-devel/20230118060102-mutt-send-email-mst@kernel.org/
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2155173
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-01-23 8:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 17:24 [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
2023-01-19 17:24 ` [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()" Greg Kurz
2023-01-19 18:39 ` Greg Kurz
2023-01-19 21:10 ` Stefan Hajnoczi
2023-01-20 15:03 ` Maxime Coquelin
2023-01-19 17:24 ` [PATCH 2/2] Revert "vhost-user: Introduce nested event loop " Greg Kurz
2023-01-20 15:13 ` Maxime Coquelin
2023-01-23 8:21 ` [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case Greg Kurz
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).