io_uring: support true async buffered reads, if file provides it async-buffered.5
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:24:42 +0000 (09:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 May 2020 19:32:04 +0000 (13:32 -0600)
commite12d27a88f6179a2a643c666892fa53ed885137e
tree252f986cdcdce54cd1bd896ad01714d085e71068
parent9bfa529518cb2402d8f8384b95530cb0a7d2b16e
io_uring: support true async buffered reads, if file provides it

If the file is flagged with FMODE_BUF_RASYNC, then we don't have to punt
the buffered read to an io-wq worker. Instead we can rely on page
unlocking callbacks to support retry based async IO. This is a lot more
efficient than doing async thread offload.

The retry is done similarly to how we handle poll based retry. From
the unlock callback, we simply queue the retry to a task_work based
handler.

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