]> 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)
commit6dcf50514109b17863b753b670846bdd1f84faef
tree611c0d0e81edb1e383932e9ce53148aa22a038e6
parentfb7dd0166a043514f821b47f6e3d0b702b7540fc
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