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.
Unified · Split
| @@ -6602,13 +6602,13 @@ static void __init wq_cpu_intensive_thresh_init(void) · 6601 unmodified lines | ||
| 6602 | 6602 | unsigned long thresh; |
| 6603 | 6603 | unsigned long bogo; |
| 6604 | 6604 | |
| 6605 | + pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release"); | |
| 6606 | + BUG_ON(IS_ERR(pwq_release_worker)); | |
| 6607 | + | |
| 6605 | 6608 | /* if the user set it to a specific value, keep it */ |
| 6606 | 6609 | if (wq_cpu_intensive_thresh_us != ULONG_MAX) |
| 6607 | 6610 | return; |
| 6608 | 6611 | |
| 6609 | − pwq_release_worker = kthread_create_worker(0, "pool_workqueue_release"); | |
| 6610 | − BUG_ON(IS_ERR(pwq_release_worker)); | |
| 6611 | − | |
| 6612 | 6612 | /* |
| 6613 | 6613 | * The default of 10ms is derived from the fact that most modern (as of |
| 6614 | 6614 | * 2023) processors can do a lot in 10ms and that it's just below what |