mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
workqueue: Fix missed pwq_release_worker creation in wq_cpu_intensive_thresh_init()
Currently, if the wq_cpu_intensive_thresh_us is set to specific
value, will cause the wq_cpu_intensive_thresh_init() early exit
and missed creation of pwq_release_worker. this commit therefore
create the pwq_release_worker in advance before checking the
wq_cpu_intensive_thresh_us.
Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 967b494e2f
("workqueue: Use a kthread_worker to release pool_workqueues")
This commit is contained in:
parent
a682821448
commit
dd64c873ed
@ -6602,13 +6602,13 @@ static void __init wq_cpu_intensive_thresh_init(void)
|
||||
unsigned long thresh;
|
||||
unsigned long bogo;
|
||||
|
||||
pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release");
|
||||
BUG_ON(IS_ERR(pwq_release_worker));
|
||||
|
||||
/* if the user set it to a specific value, keep it */
|
||||
if (wq_cpu_intensive_thresh_us != ULONG_MAX)
|
||||
return;
|
||||
|
||||
pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release");
|
||||
BUG_ON(IS_ERR(pwq_release_worker));
|
||||
|
||||
/*
|
||||
* The default of 10ms is derived from the fact that most modern (as of
|
||||
* 2023) processors can do a lot in 10ms and that it's just below what
|
||||
|
Loading…
Reference in New Issue
Block a user