]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: save atomic dec for inline executed reqs
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 19 Jan 2021 13:32:47 +0000 (13:32 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Feb 2021 17:02:42 +0000 (10:02 -0700)
commit29116795ca76cc8a57e358a3d1ac3fe1116b03ed
treeab6f899c1118e520edc267eadc9e47df521913a1
parentc63f9c27df105b5c21d4fff503957104e1289ca2
io_uring: save atomic dec for inline executed reqs

When a request is completed with comp_state, its completion reference
put is deferred to io_submit_flush_completions(), but the submission
is put not far from there, so do it together to save one atomic dec per
request. That targets requests that complete inline, e.g. buffered rw,
send/recv.

Proper benchmarking haven't been conducted but for nops(batch=32) it was
around 7901 vs 8117 KIOPS (~2.7%), or ~4% per perf profiling.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c