aio-posix: move RCU_READ_LOCK() into run_poll_handlers()
commit3aa221b382c9b36db1750ef5ed340b6566aacb8c
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 5 Mar 2020 17:08:01 +0000 (5 17:08 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 9 Mar 2020 16:41:31 +0000 (9 16:41 +0000)
treebdc6ceb75661f05b66ab4b77e9a4a59c0da1e490
parente4346192f1c2e1683a807b46efac47ef0cf9b545
aio-posix: move RCU_READ_LOCK() into run_poll_handlers()

Now that run_poll_handlers_once() is only called by run_poll_handlers()
we can improve the CPU time profile by moving the expensive
RCU_READ_LOCK() out of the polling loop.

This reduces the run_poll_handlers() from 40% CPU to 10% CPU in perf's
sampling profiler output.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20200305170806.1313245-3-stefanha@redhat.com
Message-Id: <20200305170806.1313245-3-stefanha@redhat.com>
util/aio-posix.c