mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
aio: add flag to skip fds to aio_dispatch()
Polling mode will not call ppoll(2)/epoll_wait(2). Therefore we know there are no fds ready and should avoid looping over fd handlers in aio_dispatch(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-2-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
0891ee1112
commit
721671ade7
4 changed files with 20 additions and 8 deletions
|
@ -295,8 +295,12 @@ bool aio_pending(AioContext *ctx);
|
|||
/* Dispatch any pending callbacks from the GSource attached to the AioContext.
|
||||
*
|
||||
* This is used internally in the implementation of the GSource.
|
||||
*
|
||||
* @dispatch_fds: true to process fds, false to skip them
|
||||
* (can be used as an optimization by callers that know there
|
||||
* are no fds ready)
|
||||
*/
|
||||
bool aio_dispatch(AioContext *ctx);
|
||||
bool aio_dispatch(AioContext *ctx, bool dispatch_fds);
|
||||
|
||||
/* Progress in completing AIO work to occur. This can issue new pending
|
||||
* aio as a result of executing I/O completion or bh callbacks.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue