]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit13666e6585c1461bb64a664e8e3f32aaad06b11e
tree9e5cb950fa5d4fbafd3981e569ef3d9c856cf127
parentc2e25c107b74a9e2ac43fb93a077a7ec98e6a4a5
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