Re: [PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-05 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 06:53:09PM +0200, Paolo Bonzini wrote: > On 04/08/20 12:29, Stefan Hajnoczi wrote: > > On Tue, Aug 04, 2020 at 06:28:04AM +0100, Stefan Hajnoczi wrote: > >> @@ -597,15 +574,38 @@ bool aio_poll(AioContext *ctx, bool blocking) > >> * system call---a single round of run_p

Re: [PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-04 Thread Paolo Bonzini
On 04/08/20 12:29, Stefan Hajnoczi wrote: > On Tue, Aug 04, 2020 at 06:28:04AM +0100, Stefan Hajnoczi wrote: >> @@ -597,15 +574,38 @@ bool aio_poll(AioContext *ctx, bool blocking) >> * system call---a single round of run_poll_handlers_once suffices. >> */ >> if (timeout || ctx->fdm

Re: [PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-04 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 06:28:04AM +0100, Stefan Hajnoczi wrote: > @@ -597,15 +574,38 @@ bool aio_poll(AioContext *ctx, bool blocking) > * system call---a single round of run_poll_handlers_once suffices. > */ > if (timeout || ctx->fdmon_ops->need_wait(ctx)) { > +/* > +

[PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-03 Thread Stefan Hajnoczi
Polling only monitors the ctx->notified field and does not need the ctx->notifier EventNotifier to be signalled. Keep ctx->aio_notify_me disabled while polling to avoid unnecessary EventNotifier syscalls. This optimization improves virtio-blk 4KB random read performance by 18%. The following resul