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>
Sat, 28 Dec 2019 19:02:36 +0000 (12:02 -0700)
commitb141c9c8c5e034cf4619109247e4f3eb39faeab7
tree0023ac5fd7b6378b2e083bc6ddddab94739238a6
parentc9a3e36dda9f2140da5f81a7abb56a6456504668
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