io_uring: extend async work merging
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Sep 2019 16:16:13 +0000 (10:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Sep 2019 20:18:48 +0000 (14:18 -0600)
commit6d5d5ac522b20b65167dafe0656b7cad05ec48b3
tree219790d3cf1df83a183aa757c016c7731dd236f4
parent54a91f3bb9b96ed86bc12b2f7e06b3fce8e86503
io_uring: extend async work merging

We currently merge async work items if we see a strict sequential hit.
This helps avoid unnecessary workqueue switches when we don't need
them. We can extend this merging to cover cases where it's not a strict
sequential hit, but the IO still fits within the same page. If an
application is doing multiple requests within the same page, we don't
want separate workers waiting on the same page to complete IO. It's much
faster to let the first worker bring in the page, then operate on that
page from the same worker to complete the next request(s).

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c