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)
commitd8a6df10aac9f2e4d5f30aff3129d552d2984ce7
treec254a63bd2029e29853e1f28568bfc06e4e41b2d
parent500a373d731ac506612db12631ec21295c1ff360
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