]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: use percpu counters to track inflight requests
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Oct 2020 22:24:45 +0000 (16:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 17 Oct 2020 15:25:47 +0000 (09:25 -0600)
commitbb4267a083c3f9678109c8f5a8e4594635b8cc49
treec254a63bd2029e29853e1f28568bfc06e4e41b2d
parentcc63c94dc7981c1704f3e354469445c3c7ad42f6
io_uring: use percpu counters to track inflight requests

Even though we place the req_issued and req_complete in separate
cachelines, there's considerable overhead in doing the atomics
particularly on the completion side.

Get rid of having the two counters, and just use a percpu_counter for
this. That's what it was made for, after all. This considerably
reduces the overhead in __io_free_req().

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