OSDN Git Service

io-wq: get rid of FIXED worker flag
authorJens Axboe <axboe@kernel.dk>
Wed, 1 Sep 2021 19:01:17 +0000 (13:01 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Sep 2021 17:12:16 +0000 (11:12 -0600)
commit05c5f4ee4da7086cceacc78bf3a080e314c241fa
tree40b4e0b40f69458897cab7ba70edba0e1894b639
parent15e20db2e0cecce0bfc6a67b69e55020fe9cda00
io-wq: get rid of FIXED worker flag

It makes the logic easier to follow if we just get rid of the fixed worker
flag, and simply ensure that we never exit the last worker in the group.
This also means that no particular worker is special.

Just track the last timeout state, and if we have hit it and no work
is pending, check if there are other workers. If yes, then we can exit
this one safely.

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