Skip to content

Commit dd64c87

Browse files
Zqianghtejun
authored andcommitted
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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Fixes: 967b494 ("workqueue: Use a kthread_worker to release pool_workqueues")
1 parent a682821 commit dd64c87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/workqueue.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6602,13 +6602,13 @@ static void __init wq_cpu_intensive_thresh_init(void)
66026602
unsigned long thresh;
66036603
unsigned long bogo;
66046604

6605+
pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release");
6606+
BUG_ON(IS_ERR(pwq_release_worker));
6607+
66056608
/* if the user set it to a specific value, keep it */
66066609
if (wq_cpu_intensive_thresh_us != ULONG_MAX)
66076610
return;
66086611

6609-
pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release");
6610-
BUG_ON(IS_ERR(pwq_release_worker));
6611-
66126612
/*
66136613
* The default of 10ms is derived from the fact that most modern (as of
66146614
* 2023) processors can do a lot in 10ms and that it's just below what

0 commit comments

Comments
 (0)