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>
Sun, 29 Dec 2019 16:05:23 +0000 (09:05 -0700)
commit1dcb5812a82152d3fb2de7bd55a665635ade654c
tree3c75d0fc83f048d0a82000d5243fa8b56abf620b
parentaad60525393b7dd1226634631b19b734c7768a5c
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