From: Zqiang <qiang.zhang1211@gmail.com>
To: tj@kernel.org, jiangshanlai@gmail.com, naresh.kamboju@linaro.org,
qiang.zhang1211@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] workqueue: Disable check CPU-hogging work when set wq_cpu_intensive_thresh_us=0
Date: Tue, 23 May 2023 22:09:42 +0800 [thread overview]
Message-ID: <20230523140942.18679-2-qiang.zhang1211@gmail.com> (raw)
In-Reply-To: <20230523140942.18679-1-qiang.zhang1211@gmail.com>
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
next prev parent reply other threads:[~2023-05-23 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 14:09 [PATCH v2] workqueue: Fix warning triggered when nr_running is checked in worker_enter_idle() Zqiang
2023-05-23 14:09 ` Zqiang [this message]
2023-05-23 19:40 ` Tejun Heo
2023-05-23 19:48 ` Tejun Heo
2023-05-24 3:39 ` Z qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230523140942.18679-2-qiang.zhang1211@gmail.com \
--to=qiang.zhang1211@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®