OSDN Git Service

io_uring: support true async buffered reads, if file provides it
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:24:42 +0000 (09:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Jun 2020 02:44:26 +0000 (20:44 -0600)
commitbcf5a06304d69a3bb194a494d87b532d5e90b01c
tree01ec098ddd54b17afd91acabe165836994276840
parentd1932dc3dc268f8dd5201c64971324d06ba977cc
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