[PATCH] workqueue: Disable check CPU-hogging work when set wq_cpu_intensive_thresh_us=0

From: Zqiang
Date: Tue May 23 2023 - 10:12:53 EST


This commit disable check CPU-hogging work in wq_worker_tick(), when set
the 'workqueue.cpu_intensive_thresh_us=0' in bootparams.

Signed-off-by: Zqiang <qiang.zhang1211@xxxxxxxxx>
---
kernel/workqueue.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index e548b2eda12a..ccbc9f2dafa6 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1145,6 +1145,7 @@ void wq_worker_tick(struct task_struct *task)
* CPU_INTENSIVE to avoid stalling other concurrency-managed work items.
*/
if ((worker->flags & WORKER_NOT_RUNNING) || worker->sleeping ||
+ !wq_cpu_intensive_thresh_us ||
worker->task->se.sum_exec_runtime - worker->current_at <
wq_cpu_intensive_thresh_us * NSEC_PER_USEC)
return;
--
2.17.1