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

Message ID 20230523140942.18679-2-qiang.zhang1211@gmail.com
State New
Headers
Series workqueue: Disable check CPU-hogging work when set wq_cpu_intensive_thresh_us=0 |

Commit Message

Z qiang May 23, 2023, 2:09 p.m. UTC
  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(+)
  

Patch

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;