io_uring: support true async buffered reads, if file provides it async-buffered.4
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:24:42 +0000 (09:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 May 2020 16:37:25 +0000 (10:37 -0600)
commitad9e8c18aaa2beb386f99f2be58c1d0d9e0bd1aa
tree10e48eb4c427c64da4178c83464e160888042ed7
parent3ede2e90d4a242d09511a46d2adb391c10bf436e
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