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>
Tue, 21 Jan 2020 00:04:02 +0000 (17:04 -0700)
commit2b85edfc0c90efc68dea3d665bb4111bf0694e05
tree9e5cb950fa5d4fbafd3981e569ef3d9c856cf127
parent4e5ef02317b12e2ed3d604281ffb6b75261f7612
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