]> git.baikalelectronics.ru Git - kernel.git/commit
io-wq: have manager wait for all workers to exit
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Feb 2021 16:47:20 +0000 (09:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Mar 2021 13:32:33 +0000 (06:32 -0700)
commita06690b11b63c3685c4509e6ffdb57e17931db63
tree01937fa6ddfcf326fb284a60966a02e8e2ad376b
parent02b7395e0fe4ac12124b9f5064b7f8502f04f397
io-wq: have manager wait for all workers to exit

Instead of having to wait separately on workers and manager, just have
the manager wait on the workers. We use an atomic_t for the reference
here, as we need to start at 0 and allow increment from that. Since the
number of workers is naturally capped by the allowed nr of processes,
and that uses an int, there is no risk of overflow.

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