]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: manage provided buffers strictly ordered
authorJens Axboe <axboe@kernel.dk>
Thu, 17 Mar 2022 23:20:10 +0000 (17:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Mar 2022 23:20:10 +0000 (17:20 -0600)
commit4d5bae2cbb6b4333a05860e9cb1c91a37d1b94ee
tree611c0d0e81edb1e383932e9ce53148aa22a038e6
parentd46e8c5dd02f0f16f2c2b47d7837340748e0375a
io_uring: manage provided buffers strictly ordered

Workloads using provided buffers benefit from using and returning buffers
in the right order, and so does TLBs for that matter. Manage the internal
buffer list in a straight list, rather than use the head buffer as the
insertion node. Use a hashed list for the buffer group IDs instead of
xarray, the overhead is much lower this way. xarray provides internal
locking and other trickery that is handy for some uses cases, but
io_uring already locks internally for the buffer manipulation and needs
none of that.

This is good for about a 2% reduction in overhead, combination of the
improved management and the fact that the workload has an easier time
bundling back provided buffers.

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