Am 10.09.2025 um 19:56 hat Stefan Hajnoczi geschrieben:
> Commit 816a430c517e ("util/aio: Defer disabling poll mode as long as
> possible") kept polling enabled when the event loop timeout is 0. Since
> there is no timeout the event loop will continue immediately and the
> overhead of disabling and re-enabling polling can be avoided.
> 
> fdmon-io_uring.c is unable to take advantage of this optimization
> because its ->need_wait() function returns true whenever there are new
> io_uring SQEs to submit:
> 
>   if (timeout || ctx->fdmon_ops->need_wait(ctx)) {
>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Polling will be disabled even when timeout == 0.
> 
> Extend the optimization to handle the case when need_wait() returns true
> and timeout == 0.
> 
> Cc: Chao Gao <[email protected]>
> Signed-off-by: Stefan Hajnoczi <[email protected]>
> Reviewed-by: Eric Blake <[email protected]>

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


Reply via email to