io-wq: add support for bounded vs unbunded work
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2019 18:41:16 +0000 (11:41 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2019 18:41:35 +0000 (11:41 -0700)
commitc5def4ab849494d3c97f6c9fc84b2ddb868fe78c
tree5009eb525156d82f3e223f43583d4a235e27cb12
parent91d666ea43adef57a6cd50c81b9603c545654981
io-wq: add support for bounded vs unbunded work

io_uring supports request types that basically have two different
lifetimes:

1) Bounded completion time. These are requests like disk reads or writes,
   which we know will finish in a finite amount of time.
2) Unbounded completion time. These are generally networked IO, where we
   have no idea how long they will take to complete. Another example is
   POLL commands.

This patch provides support for io-wq to handle these differently, so we
don't starve bounded requests by tying up workers for too long. By default
all work is bounded, unless otherwise specified in the work item.

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