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

Zqiang posted 1 patch 2 years, 8 months ago
kernel/workqueue.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] workqueue: Disable check CPU-hogging work when set wq_cpu_intensive_thresh_us=0
Posted by Zqiang 2 years, 8 months ago
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@gmail.com>
---
 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