Am 10.09.2025 um 19:56 hat Stefan Hajnoczi geschrieben:
> There is no need for aio_context_use_g_source() now that epoll(7) and
> io_uring(7) file descriptor monitoring works with the glib event loop.
> AioContext doesn't need to be notified that GSource is being used.
> 
> Signed-off-by: Stefan Hajnoczi <[email protected]>
> Reviewed-by: Eric Blake <[email protected]>

We should probably mention in the commit message that this causes the
default fdmon on Linux to change from poll to io_uring. It's a small
code change, but it makes QEMU use a completely different code path by
default.

With this added: Reviewed-by: Kevin Wolf <[email protected]>

> diff --git a/tests/unit/test-nested-aio-poll.c 
> b/tests/unit/test-nested-aio-poll.c
> index 45484e745b..d13ecccd8c 100644
> --- a/tests/unit/test-nested-aio-poll.c
> +++ b/tests/unit/test-nested-aio-poll.c
> @@ -83,12 +83,6 @@ static void test(void)
>      /* Enable polling */
>      aio_context_set_poll_params(td.ctx, 1000000, 2, 2, &error_abort);
>  
> -    /*
> -     * The GSource is unused but this has the side-effect of changing the 
> fdmon
> -     * that AioContext uses.
> -     */
> -    aio_get_g_source(td.ctx);
> -
>      /* Make the event notifier active (set) right away */
>      event_notifier_init(&td.poll_notifier, 1);
>      aio_set_event_notifier(td.ctx, &td.poll_notifier,

I wonder if it wouldn't make sense to squash this hunk into patch 3
('tests/unit: skip test-nested-aio-poll with io_uring').

Kevin


Reply via email to