workqueue: Control intensive warning threshold through cmdline
authorXuewen Yan <xuewen.yan@unisoc.com>
Thu, 22 Feb 2024 07:28:08 +0000 (15:28 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 22 Feb 2024 17:50:45 +0000 (07:50 -1000)
commitccdec92198df0c91f45a68f971771b6b0c1ba02d
tree3b59c5572a4ce81a76168b922480cd45b201f89e
parentbccdc1faafaf32e00d6e4dddca1ded64e3272189
workqueue: Control intensive warning threshold through cmdline

When CONFIG_WQ_CPU_INTENSIVE_REPORT is set, the kernel will report
the work functions which violate the intensive_threshold_us repeatedly.
And now, only when the violate times exceed 4 and is a power of 2,
the kernel warning could be triggered.

However, sometimes, even if a long work execution time occurs only once,
it may cause other work to be delayed for a long time. This may also
cause some problems sometimes.

In order to freely control the threshold of warninging, a boot argument
is added so that the user can control the warning threshold to be printed.
At the same time, keep the exponential backoff to prevent reporting too much.

By default, the warning threshold is 4.

tj: Updated kernel-parameters.txt description.

Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/admin-guide/kernel-parameters.txt
kernel/workqueue.c