io_uring: batch getting pcpu references
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 28 Dec 2019 11:13:03 +0000 (14:13 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Jan 2020 22:05:02 +0000 (15:05 -0700)
commite93aff0a85713b6a6123c43da1d59728cc49caf4
tree6a03e3046a394297d5ebc3c3e57e228e2fa6a8cc
parent8735c5c05128823bd1b75dd1cc15114a1843ed4d
io_uring: batch getting pcpu references

percpu_ref_tryget() has its own overhead. Instead getting a reference
for each request, grab a bunch once per io_submit_sqes().

~5% throughput boost for a "submit and wait 128 nops" benchmark.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
__io_req_free_empty() -> __io_req_do_free()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c