kernel: make IO threads unfreezable by default
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 02:49:02 +0000 (19:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:28:43 +0000 (07:28 -0700)
commite22bc9b481a90d7898984ea17621f04a653e2cd1
tree9c7f6a4821f3afecdbeca3eb07e2d397e0a3dc4c
parente8f98f24549d62cc54bf608c815904a56d4437bc
kernel: make IO threads unfreezable by default

The io-wq threads were already marked as no-freeze, but the manager was
not. On resume, we perpetually have signal_pending() being true, and
hence the manager will loop and spin 100% of the time.

Just mark the tasks created by create_io_thread() as PF_NOFREEZE by
default, and remove any knowledge of it in io-wq and io_uring.

Reported-by: Kevin Locke <kevin@kevinlocke.name>
Tested-by: Kevin Locke <kevin@kevinlocke.name>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io_uring.c
kernel/fork.c