qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL for-5.0 0/1] Block patches
@ 2020-04-03 11:52 Stefan Hajnoczi
  2020-04-03 11:52 ` [PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring Stefan Hajnoczi
  2020-04-03 15:18 ` [PULL for-5.0 0/1] Block patches Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2020-04-03 11:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, qemu-block, Peter Maydell, Max Reitz,
	Stefan Hajnoczi

The following changes since commit 5142ca078d1cbc0f77b0f385d28cdb3e504e62bd:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2020-04-02 20:18:25 +0100)

are available in the Git repository at:

  https://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to ae60ab7eb20715fa63cca1b0bb4493e160da51ce:

  aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring (2020-04-03 12:42:40 +0100)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

Stefan Hajnoczi (1):
  aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

 util/fdmon-io_uring.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.25.1


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

* [PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring
  2020-04-03 11:52 [PULL for-5.0 0/1] Block patches Stefan Hajnoczi
@ 2020-04-03 11:52 ` Stefan Hajnoczi
  2020-04-03 15:18 ` [PULL for-5.0 0/1] Block patches Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2020-04-03 11:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, qemu-block, Peter Maydell, Max Reitz,
	Stefan Hajnoczi, Cole Robinson, Stefano Garzarella

When a file descriptor becomes ready we must re-arm POLL_ADD.  This is
done by adding an sqe to the io_uring sq ring.  The ->need_wait()
function wasn't taking pending sqes into account and therefore
io_uring_submit_and_wait() was not being called.  Polling for cqes
failed to detect fd readiness since we hadn't submitted the sqe to
io_uring.

This patch fixes the following tests/test-aio -p /aio/event/wait
failure:

  ok 11 /aio/event/wait
  **
  ERROR:tests/test-aio.c:374:test_flush_event_notifier: assertion failed: (aio_poll(ctx, false))

Reported-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200402145434.99349-1-stefanha@redhat.com
Fixes: 73fd282e7b6dd4e4ea1c3bbb3d302c8db51e4ccf
       ("aio-posix: add io_uring fd monitoring implementation")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 util/fdmon-io_uring.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/util/fdmon-io_uring.c b/util/fdmon-io_uring.c
index 7e143ef515..b4d6109f20 100644
--- a/util/fdmon-io_uring.c
+++ b/util/fdmon-io_uring.c
@@ -295,7 +295,12 @@ static bool fdmon_io_uring_need_wait(AioContext *ctx)
         return true;
     }
 
-    /* Do we need to submit new io_uring sqes? */
+    /* Are there pending sqes to submit? */
+    if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
+        return true;
+    }
+
+    /* Do we need to process AioHandlers for io_uring changes? */
     if (!QSLIST_EMPTY_RCU(&ctx->submit_list)) {
         return true;
     }
-- 
2.25.1


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

* Re: [PULL for-5.0 0/1] Block patches
  2020-04-03 11:52 [PULL for-5.0 0/1] Block patches Stefan Hajnoczi
  2020-04-03 11:52 ` [PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring Stefan Hajnoczi
@ 2020-04-03 15:18 ` Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-04-03 15:18 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, Fam Zheng, QEMU Developers, Qemu-block, Max Reitz

On Fri, 3 Apr 2020 at 12:52, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 5142ca078d1cbc0f77b0f385d28cdb3e504e62bd:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2020-04-02 20:18:25 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to ae60ab7eb20715fa63cca1b0bb4493e160da51ce:
>
>   aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring (2020-04-03 12:42:40 +0100)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM


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

* Re: [PULL for-5.0 0/1] Block patches
  2020-03-23 19:24 Stefan Hajnoczi
@ 2020-03-24  9:50 ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-03-24  9:50 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, Fam Zheng, QEMU Developers, Qemu-block, Max Reitz

On Mon, 23 Mar 2020 at 19:24, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 29e0855c5af62bbb0b0b6fed792e004dad92ba95:
>
>   Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging (2020-03-22 21:00:38 +0000)
>
> are available in the Git repository at:
>
>   https://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to ff807d559205a434fd37d3343f01a0ab128bd190:
>
>   aio-posix: fix io_uring with external events (2020-03-23 11:05:44 +0000)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------
>
> Stefan Hajnoczi (1):
>   aio-posix: fix io_uring with external events
>
>  util/fdmon-io_uring.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM


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

* [PULL for-5.0 0/1] Block patches
@ 2020-03-23 19:24 Stefan Hajnoczi
  2020-03-24  9:50 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2020-03-23 19:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Peter Maydell, qemu-block, Max Reitz,
	Stefan Hajnoczi, Fam Zheng

The following changes since commit 29e0855c5af62bbb0b0b6fed792e004dad92ba95:

  Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging (2020-03-22 21:00:38 +0000)

are available in the Git repository at:

  https://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to ff807d559205a434fd37d3343f01a0ab128bd190:

  aio-posix: fix io_uring with external events (2020-03-23 11:05:44 +0000)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

Stefan Hajnoczi (1):
  aio-posix: fix io_uring with external events

 util/fdmon-io_uring.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-04-03 15:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 11:52 [PULL for-5.0 0/1] Block patches Stefan Hajnoczi
2020-04-03 11:52 ` [PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring Stefan Hajnoczi
2020-04-03 15:18 ` [PULL for-5.0 0/1] Block patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2020-03-23 19:24 Stefan Hajnoczi
2020-03-24  9:50 ` Peter Maydell

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