diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-03-09 19:49:02 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-03-10 07:28:43 -0700 |
commit | e22bc9b481a90d7898984ea17621f04a653e2cd1 (patch) | |
tree | 9c7f6a4821f3afecdbeca3eb07e2d397e0a3dc4c /kernel | |
parent | e8f98f24549d62cc54bf608c815904a56d4437bc (diff) |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index d3171e8e88e5..72e444cd0ffe 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -2436,6 +2436,7 @@ struct task_struct *create_io_thread(int (*fn)(void *), void *arg, int node) if (!IS_ERR(tsk)) { sigfillset(&tsk->blocked); sigdelsetmask(&tsk->blocked, sigmask(SIGKILL)); + tsk->flags |= PF_NOFREEZE; } return tsk; } |