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>
Fri, 16 Oct 2020 13:04:57 +0000 (07:04 -0600)
commitb45241b209a1d3d5c11dbea2d613f43d19c2ea73
tree4a59f7eb96b7d9ece5ef9595435b729b1ba02aa4
parent6fc87e395e00b58d3a9029637fa55896ba7fbf8e
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