summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-18 22:56:34 -0700
committerJens Axboe <axboe@kernel.dk>2019-03-02 12:43:27 -0700
commitd929ff6e9c490d06f0e737493486af951e1c1d7e (patch)
treec99f9a0aac24dd0e1b801a390860b49a7d6d3c61 /crypto
parenta4ffd959926b7e86dbd37b476d0fef89d240601a (diff)
io_uring: allow workqueue item to handle multiple buffered requestsio_uring-20190301
Right now we punt any buffered request that ends up triggering an -EAGAIN to an async workqueue. This works fine in terms of providing async execution of them, but it also can create quite a lot of work queue items. For sequentially buffered IO, it's advantageous to serialize the issue of them. For reads, the first one will trigger a read-ahead, and subsequent request merely end up waiting on later pages to complete. For writes, devices usually respond better to streamed sequential writes. Add state to track the last buffered request we punted to a work queue, and if the next one is sequential to the previous, attempt to get the previous work item to handle it. We limit the number of sequential add-ons to the a multiple (8) of the max read-ahead size of the file. This should be a good number for both reads and wries, as it defines the max IO size the device can do directly. This drastically cuts down on the number of context switches we need to handle buffered sequential IO, and a basic test case of copying a big file with io_uring sees a 5x speedup. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions