OSDN Git Service

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>
Tue, 21 Jan 2020 00:03:59 +0000 (17:03 -0700)
commit895e2ca0f693c672902191747b548bdc56f0c7de
treef8584b4eb5a901df37e5c40aea54081e681a624f
parenteddc7ef52a6b37b7ba3d1c8a8fbb63d5d9914f8a
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