qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] virtio: Re-enable notifications after drain
@ 2024-02-02 15:31 Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 1/3] virtio-scsi: Attach event vq notifier with no_poll Hanna Czenczek
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Hanna Czenczek @ 2024-02-02 15:31 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Hanna Czenczek, qemu-stable, Stefan Hajnoczi,
	Fiona Ebner, Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin,
	Fam Zheng

v1:

https://lists.nongnu.org/archive/html/qemu-block/2024-01/msg00336.html


Hi,

This is basically the same series as v1: When using
aio_set_event_notifier_poll(), the io_poll_end() callback is only
invoked when polling ends, not when the notifier is being removed while
in a polling section.  This can leave the virtqueue notifier disabled
during drained sections, which however is not a bad thing.  We just need
to ensure they are re-enabled after the drain, and kick the virtqueue
once to pick up all the requests that came in during the drained
section.

Patch 1 is a technically unrelated fix, but addresses a problem that
became visible with patch 2 applied.

Patch 3 is a small (optional) clean-up patch.


v2:
- Changed the title of this series and patch 2 (was: "Keep notifications
  disabled durin drain"): Keeping the notifier disabled was something
  the initial RFC did, this version (v1 too) just ensures the notifier
  is enabled after the drain, regardless of its state before.

- Use event_notifier_set() instead of virtio_queue_notify() in patch 2

- Added patch 3


Hanna Czenczek (3):
  virtio-scsi: Attach event vq notifier with no_poll
  virtio: Re-enable notifications after drain
  virtio-blk: Use ioeventfd_attach in start_ioeventfd

 include/block/aio.h   |  7 ++++++-
 hw/block/virtio-blk.c | 21 ++++++++++-----------
 hw/scsi/virtio-scsi.c |  7 ++++++-
 hw/virtio/virtio.c    | 42 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 13 deletions(-)

-- 
2.43.0



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

* [PATCH v2 1/3] virtio-scsi: Attach event vq notifier with no_poll
  2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
@ 2024-02-02 15:31 ` Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 2/3] virtio: Re-enable notifications after drain Hanna Czenczek
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Hanna Czenczek @ 2024-02-02 15:31 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Hanna Czenczek, qemu-stable, Stefan Hajnoczi,
	Fiona Ebner, Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin,
	Fam Zheng

As of commit 38738f7dbbda90fbc161757b7f4be35b52205552 ("virtio-scsi:
don't waste CPU polling the event virtqueue"), we only attach an io_read
notifier for the virtio-scsi event virtqueue instead, and no polling
notifiers.  During operation, the event virtqueue is typically
non-empty, but none of the buffers are intended to be used immediately.
Instead, they only get used when certain events occur.  Therefore, it
makes no sense to continuously poll it when non-empty, because it is
supposed to be and stay non-empty.

We do this by using virtio_queue_aio_attach_host_notifier_no_poll()
instead of virtio_queue_aio_attach_host_notifier() for the event
virtqueue.

Commit 766aa2de0f29b657148e04599320d771c36fd126 ("virtio-scsi: implement
BlockDevOps->drained_begin()") however has virtio_scsi_drained_end() use
virtio_queue_aio_attach_host_notifier() for all virtqueues, including
the event virtqueue.  This can lead to it being polled again, undoing
the benefit of commit 38738f7dbbda90fbc161757b7f4be35b52205552.

Fix it by using virtio_queue_aio_attach_host_notifier_no_poll() for the
event virtqueue.

Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Fixes: 766aa2de0f29b657148e04599320d771c36fd126
       ("virtio-scsi: implement BlockDevOps->drained_begin()")
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
---
 hw/scsi/virtio-scsi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 690aceec45..9f02ceea09 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -1149,6 +1149,7 @@ static void virtio_scsi_drained_begin(SCSIBus *bus)
 static void virtio_scsi_drained_end(SCSIBus *bus)
 {
     VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
+    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
     VirtIODevice *vdev = VIRTIO_DEVICE(s);
     uint32_t total_queues = VIRTIO_SCSI_VQ_NUM_FIXED +
                             s->parent_obj.conf.num_queues;
@@ -1166,7 +1167,11 @@ static void virtio_scsi_drained_end(SCSIBus *bus)
 
     for (uint32_t i = 0; i < total_queues; i++) {
         VirtQueue *vq = virtio_get_queue(vdev, i);
-        virtio_queue_aio_attach_host_notifier(vq, s->ctx);
+        if (vq == vs->event_vq) {
+            virtio_queue_aio_attach_host_notifier_no_poll(vq, s->ctx);
+        } else {
+            virtio_queue_aio_attach_host_notifier(vq, s->ctx);
+        }
     }
 }
 
-- 
2.43.0



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

* [PATCH v2 2/3] virtio: Re-enable notifications after drain
  2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 1/3] virtio-scsi: Attach event vq notifier with no_poll Hanna Czenczek
@ 2024-02-02 15:31 ` Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd Hanna Czenczek
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Hanna Czenczek @ 2024-02-02 15:31 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Hanna Czenczek, qemu-stable, Stefan Hajnoczi,
	Fiona Ebner, Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin,
	Fam Zheng

During drain, we do not care about virtqueue notifications, which is why
we remove the handlers on it.  When removing those handlers, whether vq
notifications are enabled or not depends on whether we were in polling
mode or not; if not, they are enabled (by default); if so, they have
been disabled by the io_poll_start callback.

Because we do not care about those notifications after removing the
handlers, this is fine.  However, we have to explicitly ensure they are
enabled when re-attaching the handlers, so we will resume receiving
notifications.  We do this in virtio_queue_aio_attach_host_notifier*().
If such a function is called while we are in a polling section,
attaching the notifiers will then invoke the io_poll_start callback,
re-disabling notifications.

Because we will always miss virtqueue updates in the drained section, we
also need to poll the virtqueue once after attaching the notifiers.

Buglink: https://issues.redhat.com/browse/RHEL-3934
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
---
 include/block/aio.h |  7 ++++++-
 hw/virtio/virtio.c  | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/include/block/aio.h b/include/block/aio.h
index 5d0a114988..8378553eb9 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -480,9 +480,14 @@ void aio_set_event_notifier(AioContext *ctx,
                             AioPollFn *io_poll,
                             EventNotifierHandler *io_poll_ready);
 
-/* Set polling begin/end callbacks for an event notifier that has already been
+/*
+ * Set polling begin/end callbacks for an event notifier that has already been
  * registered with aio_set_event_notifier.  Do nothing if the event notifier is
  * not registered.
+ *
+ * Note that if the io_poll_end() callback (or the entire notifier) is removed
+ * during polling, it will not be called, so an io_poll_begin() is not
+ * necessarily always followed by an io_poll_end().
  */
 void aio_set_event_notifier_poll(AioContext *ctx,
                                  EventNotifier *notifier,
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 7549094154..d229755eae 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3556,6 +3556,17 @@ static void virtio_queue_host_notifier_aio_poll_end(EventNotifier *n)
 
 void virtio_queue_aio_attach_host_notifier(VirtQueue *vq, AioContext *ctx)
 {
+    /*
+     * virtio_queue_aio_detach_host_notifier() can leave notifications disabled.
+     * Re-enable them.  (And if detach has not been used before, notifications
+     * being enabled is still the default state while a notifier is attached;
+     * see virtio_queue_host_notifier_aio_poll_end(), which will always leave
+     * notifications enabled once the polling section is left.)
+     */
+    if (!virtio_queue_get_notification(vq)) {
+        virtio_queue_set_notification(vq, 1);
+    }
+
     aio_set_event_notifier(ctx, &vq->host_notifier,
                            virtio_queue_host_notifier_read,
                            virtio_queue_host_notifier_aio_poll,
@@ -3563,6 +3574,13 @@ void virtio_queue_aio_attach_host_notifier(VirtQueue *vq, AioContext *ctx)
     aio_set_event_notifier_poll(ctx, &vq->host_notifier,
                                 virtio_queue_host_notifier_aio_poll_begin,
                                 virtio_queue_host_notifier_aio_poll_end);
+
+    /*
+     * We will have ignored notifications about new requests from the guest
+     * while no notifiers were attached, so "kick" the virt queue to process
+     * those requests now.
+     */
+    event_notifier_set(&vq->host_notifier);
 }
 
 /*
@@ -3573,14 +3591,38 @@ void virtio_queue_aio_attach_host_notifier(VirtQueue *vq, AioContext *ctx)
  */
 void virtio_queue_aio_attach_host_notifier_no_poll(VirtQueue *vq, AioContext *ctx)
 {
+    /* See virtio_queue_aio_attach_host_notifier() */
+    if (!virtio_queue_get_notification(vq)) {
+        virtio_queue_set_notification(vq, 1);
+    }
+
     aio_set_event_notifier(ctx, &vq->host_notifier,
                            virtio_queue_host_notifier_read,
                            NULL, NULL);
+
+    /*
+     * See virtio_queue_aio_attach_host_notifier().
+     * Note that this may be unnecessary for the type of virtqueues this
+     * function is used for.  Still, it will not hurt to have a quick look into
+     * whether we can/should process any of the virtqueue elements.
+     */
+    event_notifier_set(&vq->host_notifier);
 }
 
 void virtio_queue_aio_detach_host_notifier(VirtQueue *vq, AioContext *ctx)
 {
     aio_set_event_notifier(ctx, &vq->host_notifier, NULL, NULL, NULL);
+
+    /*
+     * aio_set_event_notifier_poll() does not guarantee whether io_poll_end()
+     * will run after io_poll_begin(), so by removing the notifier, we do not
+     * know whether virtio_queue_host_notifier_aio_poll_end() has run after a
+     * previous virtio_queue_host_notifier_aio_poll_begin(), i.e. whether
+     * notifications are enabled or disabled.  It does not really matter anyway;
+     * we just removed the notifier, so we do not care about notifications until
+     * we potentially re-attach it.  The attach_host_notifier functions will
+     * ensure that notifications are enabled again when they are needed.
+     */
 }
 
 void virtio_queue_host_notifier_read(EventNotifier *n)
-- 
2.43.0



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

* [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd
  2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 1/3] virtio-scsi: Attach event vq notifier with no_poll Hanna Czenczek
  2024-02-02 15:31 ` [PATCH v2 2/3] virtio: Re-enable notifications after drain Hanna Czenczek
@ 2024-02-02 15:31 ` Hanna Czenczek
  2024-02-09 14:38   ` Michael Tokarev
  2024-02-06 18:39 ` [PATCH v2 0/3] virtio: Re-enable notifications after drain Stefan Hajnoczi
  2024-02-07 20:52 ` Kevin Wolf
  4 siblings, 1 reply; 9+ messages in thread
From: Hanna Czenczek @ 2024-02-02 15:31 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Hanna Czenczek, qemu-stable, Stefan Hajnoczi,
	Fiona Ebner, Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin,
	Fam Zheng

Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set
ioeventfd during startup") has made virtio_blk_start_ioeventfd() always
kick the virtqueue (set the ioeventfd), regardless of whether the BB is
drained.  That is no longer necessary, because attaching the host
notifier will now set the ioeventfd, too; this happens either
immediately right here in virtio_blk_start_ioeventfd(), or later when
the drain ends, in virtio_blk_ioeventfd_attach().

With event_notifier_set() removed, the code becomes the same as the one
in virtio_blk_ioeventfd_attach(), so we can reuse that function.

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
---
 hw/block/virtio-blk.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 227d83569f..22b8eef69b 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -37,6 +37,8 @@
 #include "hw/virtio/virtio-blk-common.h"
 #include "qemu/coroutine.h"
 
+static void virtio_blk_ioeventfd_attach(VirtIOBlock *s);
+
 static void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
                                     VirtIOBlockReq *req)
 {
@@ -1808,17 +1810,14 @@ static int virtio_blk_start_ioeventfd(VirtIODevice *vdev)
     s->ioeventfd_started = true;
     smp_wmb(); /* paired with aio_notify_accept() on the read side */
 
-    /* Get this show started by hooking up our callbacks */
-    for (i = 0; i < nvqs; i++) {
-        VirtQueue *vq = virtio_get_queue(vdev, i);
-        AioContext *ctx = s->vq_aio_context[i];
-
-        /* Kick right away to begin processing requests already in vring */
-        event_notifier_set(virtio_queue_get_host_notifier(vq));
-
-        if (!blk_in_drain(s->conf.conf.blk)) {
-            virtio_queue_aio_attach_host_notifier(vq, ctx);
-        }
+    /*
+     * Get this show started by hooking up our callbacks.  If drained now,
+     * virtio_blk_drained_end() will do this later.
+     * Attaching the notifier also kicks the virtqueues, processing any requests
+     * they may already have.
+     */
+    if (!blk_in_drain(s->conf.conf.blk)) {
+        virtio_blk_ioeventfd_attach(s);
     }
     return 0;
 
-- 
2.43.0



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

* Re: [PATCH v2 0/3] virtio: Re-enable notifications after drain
  2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
                   ` (2 preceding siblings ...)
  2024-02-02 15:31 ` [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd Hanna Czenczek
@ 2024-02-06 18:39 ` Stefan Hajnoczi
  2024-02-07 20:52 ` Kevin Wolf
  4 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2024-02-06 18:39 UTC (permalink / raw)
  To: Hanna Czenczek
  Cc: qemu-block, qemu-devel, qemu-stable, Fiona Ebner, Paolo Bonzini,
	Kevin Wolf, Michael S . Tsirkin, Fam Zheng

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

On Fri, Feb 02, 2024 at 04:31:55PM +0100, Hanna Czenczek wrote:
> v1:
> 
> https://lists.nongnu.org/archive/html/qemu-block/2024-01/msg00336.html
> 
> 
> Hi,
> 
> This is basically the same series as v1: When using
> aio_set_event_notifier_poll(), the io_poll_end() callback is only
> invoked when polling ends, not when the notifier is being removed while
> in a polling section.  This can leave the virtqueue notifier disabled
> during drained sections, which however is not a bad thing.  We just need
> to ensure they are re-enabled after the drain, and kick the virtqueue
> once to pick up all the requests that came in during the drained
> section.
> 
> Patch 1 is a technically unrelated fix, but addresses a problem that
> became visible with patch 2 applied.
> 
> Patch 3 is a small (optional) clean-up patch.
> 
> 
> v2:
> - Changed the title of this series and patch 2 (was: "Keep notifications
>   disabled durin drain"): Keeping the notifier disabled was something
>   the initial RFC did, this version (v1 too) just ensures the notifier
>   is enabled after the drain, regardless of its state before.
> 
> - Use event_notifier_set() instead of virtio_queue_notify() in patch 2
> 
> - Added patch 3
> 
> 
> Hanna Czenczek (3):
>   virtio-scsi: Attach event vq notifier with no_poll
>   virtio: Re-enable notifications after drain
>   virtio-blk: Use ioeventfd_attach in start_ioeventfd
> 
>  include/block/aio.h   |  7 ++++++-
>  hw/block/virtio-blk.c | 21 ++++++++++-----------
>  hw/scsi/virtio-scsi.c |  7 ++++++-
>  hw/virtio/virtio.c    | 42 ++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 64 insertions(+), 13 deletions(-)
> 
> -- 
> 2.43.0
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

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

* Re: [PATCH v2 0/3] virtio: Re-enable notifications after drain
  2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
                   ` (3 preceding siblings ...)
  2024-02-06 18:39 ` [PATCH v2 0/3] virtio: Re-enable notifications after drain Stefan Hajnoczi
@ 2024-02-07 20:52 ` Kevin Wolf
  4 siblings, 0 replies; 9+ messages in thread
From: Kevin Wolf @ 2024-02-07 20:52 UTC (permalink / raw)
  To: Hanna Czenczek
  Cc: qemu-block, qemu-devel, qemu-stable, Stefan Hajnoczi, Fiona Ebner,
	Paolo Bonzini, Michael S . Tsirkin, Fam Zheng

Am 02.02.2024 um 16:31 hat Hanna Czenczek geschrieben:
> Hanna Czenczek (3):
>   virtio-scsi: Attach event vq notifier with no_poll
>   virtio: Re-enable notifications after drain
>   virtio-blk: Use ioeventfd_attach in start_ioeventfd
> 
>  include/block/aio.h   |  7 ++++++-
>  hw/block/virtio-blk.c | 21 ++++++++++-----------
>  hw/scsi/virtio-scsi.c |  7 ++++++-
>  hw/virtio/virtio.c    | 42 ++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 64 insertions(+), 13 deletions(-)

Thanks, applied to the block branch.

Kevin



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

* Re: [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd
  2024-02-02 15:31 ` [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd Hanna Czenczek
@ 2024-02-09 14:38   ` Michael Tokarev
  2024-02-09 17:11     ` Hanna Czenczek
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Tokarev @ 2024-02-09 14:38 UTC (permalink / raw)
  To: Hanna Czenczek, qemu-block
  Cc: qemu-devel, qemu-stable, Stefan Hajnoczi, Fiona Ebner,
	Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin, Fam Zheng

02.02.2024 18:31, Hanna Czenczek :
> Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set
> ioeventfd during startup") has made virtio_blk_start_ioeventfd() always
> kick the virtqueue (set the ioeventfd), regardless of whether the BB is
> drained.  That is no longer necessary, because attaching the host
> notifier will now set the ioeventfd, too; this happens either
> immediately right here in virtio_blk_start_ioeventfd(), or later when
> the drain ends, in virtio_blk_ioeventfd_attach().
> 
> With event_notifier_set() removed, the code becomes the same as the one
> in virtio_blk_ioeventfd_attach(), so we can reuse that function.

The mentioned comit is v8.2.0-812-gd3f6f294ae, - ie, past 8.2.
Is this new change still relevant for stable?

Thanks,

/mjt


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

* Re: [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd
  2024-02-09 14:38   ` Michael Tokarev
@ 2024-02-09 17:11     ` Hanna Czenczek
  2024-02-10  8:37       ` Michael Tokarev
  0 siblings, 1 reply; 9+ messages in thread
From: Hanna Czenczek @ 2024-02-09 17:11 UTC (permalink / raw)
  To: Michael Tokarev, qemu-block
  Cc: qemu-devel, qemu-stable, Stefan Hajnoczi, Fiona Ebner,
	Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin, Fam Zheng

On 09.02.24 15:38, Michael Tokarev wrote:
> 02.02.2024 18:31, Hanna Czenczek :
>> Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set
>> ioeventfd during startup") has made virtio_blk_start_ioeventfd() always
>> kick the virtqueue (set the ioeventfd), regardless of whether the BB is
>> drained.  That is no longer necessary, because attaching the host
>> notifier will now set the ioeventfd, too; this happens either
>> immediately right here in virtio_blk_start_ioeventfd(), or later when
>> the drain ends, in virtio_blk_ioeventfd_attach().
>>
>> With event_notifier_set() removed, the code becomes the same as the one
>> in virtio_blk_ioeventfd_attach(), so we can reuse that function.
>
> The mentioned comit is v8.2.0-812-gd3f6f294ae, - ie, past 8.2.
> Is this new change still relevant for stable?

Sorry again. :/  This patch is a clean-up patch that won’t apply to 
8.2.  Now, 8.2 does have basically the same logic as described in the 
patch message (d3f6f294aea restored it after it was broken), so a 
similar patch could be made for it (removing the event_notifier_set() 
from virtio_blk_data_plane_start()), but whether we kick the virtqueues 
once or twice on start-up probably won’t make a difference, certainly 
not in terms of correctness.

Hanna



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

* Re: [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd
  2024-02-09 17:11     ` Hanna Czenczek
@ 2024-02-10  8:37       ` Michael Tokarev
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Tokarev @ 2024-02-10  8:37 UTC (permalink / raw)
  To: Hanna Czenczek, qemu-block
  Cc: qemu-devel, qemu-stable, Stefan Hajnoczi, Fiona Ebner,
	Paolo Bonzini, Kevin Wolf, Michael S . Tsirkin, Fam Zheng

09.02.2024 20:11, Hanna Czenczek :

>> The mentioned comit is v8.2.0-812-gd3f6f294ae, - ie, past 8.2.
>> Is this new change still relevant for stable?
> 
> Sorry again. :/ 

There's nothing to be sorry about here - it's regular work, and is quite
good at it, - I just asked to be sure, maybe I misunderstood something.

>     This patch is a clean-up patch that won’t apply to 8.2.  Now, 8.2 does have basically the same logic as described in the patch 
> message (d3f6f294aea restored it after it was broken), so a similar patch could be made for it (removing the event_notifier_set() from 
> virtio_blk_data_plane_start()), but whether we kick the virtqueues once or twice on start-up probably won’t make a difference, certainly not in terms 
> of correctness.

Ok, excellent, this makes good sense now.
I'm not including this one in stable-8.2 :)

Thank you very much for the excellent work and
the clarification!

/mjt


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

end of thread, other threads:[~2024-02-10  8:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 15:31 [PATCH v2 0/3] virtio: Re-enable notifications after drain Hanna Czenczek
2024-02-02 15:31 ` [PATCH v2 1/3] virtio-scsi: Attach event vq notifier with no_poll Hanna Czenczek
2024-02-02 15:31 ` [PATCH v2 2/3] virtio: Re-enable notifications after drain Hanna Czenczek
2024-02-02 15:31 ` [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd Hanna Czenczek
2024-02-09 14:38   ` Michael Tokarev
2024-02-09 17:11     ` Hanna Czenczek
2024-02-10  8:37       ` Michael Tokarev
2024-02-06 18:39 ` [PATCH v2 0/3] virtio: Re-enable notifications after drain Stefan Hajnoczi
2024-02-07 20:52 ` Kevin Wolf

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