io-wq: support concurrent non-blocking work
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Dec 2019 15:46:33 +0000 (08:46 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Jan 2020 22:05:00 +0000 (15:05 -0700)
commite5f2c4e029a6b27f75775f4ffb96b8e8208d5717
tree4cb1c9cec0ac7155e1287c546da2554b851ee29f
parent9b4d39f76e2574cdfb004b831c832b8203db458f
io-wq: support concurrent non-blocking work

io-wq assumes that work will complete fast (and not block), so it
doesn't create a new worker when work is enqueued, if we already have
at least one worker running. This is done on the assumption that if work
is running, then it will complete fast.

Add an option to force io-wq to fork a new worker for work queued. This
is signaled by setting IO_WQ_WORK_CONCURRENT on the work item. For that
case, io-wq will create a new worker, even though workers are already
running.

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