All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] aio-posix: keep aio_notify_me disabled during polling
@ 2020-08-04  5:28 Stefan Hajnoczi
  2020-08-04  5:28 ` [PATCH 1/3] async: rename event_notifier_dummy_cb/poll() Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2020-08-04  5:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fam Zheng, Paolo Bonzini, Stefan Hajnoczi, qemu-block

This patch series eliminates ctx->notifier EventNotifier activity when
aio_poll() is in polling mode. There is no need to use the EventNotifier since
a polling handler can detect that aio_notify() has been called by monitoring a
field in memory instead.

Optimizing out the EventNotifier calls improves null-co random read 4KB
iodepth=1 IOPS by 18%.

aio_compute_timeout() is now called twice if aio_poll() needs to block, which
means an extra qemu_clock_get_ns() call is made when there is an active timer.
An alternative would be to set timeout = 0 if ctx->notified is true before
blocking, but going around the event loop again could slow things down more.

I have not modified docs/spin/aio_notify*.promela because I'm not familiar with
the SPIN model checker.

Stefan Hajnoczi (3):
  async: rename event_notifier_dummy_cb/poll()
  async: always set ctx->notified in aio_notify()
  aio-posix: keep aio_notify_me disabled during polling

 util/aio-posix.c | 56 ++++++++++++++++++++++++------------------------
 util/async.c     | 22 +++++++++----------
 2 files changed, 38 insertions(+), 40 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-08-05  8:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04  5:28 [PATCH 0/3] aio-posix: keep aio_notify_me disabled during polling Stefan Hajnoczi
2020-08-04  5:28 ` [PATCH 1/3] async: rename event_notifier_dummy_cb/poll() Stefan Hajnoczi
2020-08-04  5:28 ` [PATCH 2/3] async: always set ctx->notified in aio_notify() Stefan Hajnoczi
2020-08-04  7:12   ` Paolo Bonzini
2020-08-04 10:23     ` Stefan Hajnoczi
2020-08-04  5:28 ` [PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling Stefan Hajnoczi
2020-08-04 10:29   ` Stefan Hajnoczi
2020-08-04 16:53     ` Paolo Bonzini
2020-08-05  8:59       ` Stefan Hajnoczi
2020-08-04  7:13 ` [PATCH 0/3] " Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.