From: Tejun Heo <tj@kernel.org>
To: Xuewen Yan <xuewen.yan@unisoc.com>
Cc: corbet@lwn.net, jiangshanlai@gmail.com, paulmck@kernel.org,
rdunlap@infradead.org, peterz@infradead.org, yanjiewtw@gmail.com,
ke.wang@unisoc.com, di.shen@unisoc.com, xuewen.yan94@gmail.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] workqueue: Control intensive warning threshold through cmdline
Date: Thu, 22 Feb 2024 07:52:13 -1000 [thread overview]
Message-ID: <ZdeJzZfPkpOKSH5c@slm.duckdns.org> (raw)
In-Reply-To: <20240222072808.5363-1-xuewen.yan@unisoc.com>
On Thu, Feb 22, 2024 at 03:28:08PM +0800, Xuewen Yan wrote:
> 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.
>
> Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Applied to wq/for-6.9 with the following edit:
> + workqueue.cpu_intensive_warning_thresh=<uint>
> + If CONFIG_WQ_CPU_INTENSIVE_REPORT is set, the kernel
> + will report the work functions which violate the
> + intensive_threshold_us repeatedly. In order to prevent
> + the kernel log from being printed too frequently,
> + control the frequency and the threshold.
> +
> + By Default, the threshold is 4 times, and the warning
> + is limited by powers of 2. On the other hand, 0 will
> + disable the warning.
I changed this to:
If CONFIG_WQ_CPU_INTENSIVE_REPORT is set, the kernel
will report the work functions which violate the
intensive_threshold_us repeatedly. In order to prevent
spurious warnings, start printing only after a work
function has violated this threshold number of times.
The default is 4 times. 0 disables the warning.
Thanks.
--
tejun
prev parent reply other threads:[~2024-02-22 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 7:28 Xuewen Yan
2024-02-22 17:52 ` Tejun Heo [this message]
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=ZdeJzZfPkpOKSH5c@slm.duckdns.org \
--to=tj@kernel.org \
--cc=corbet@lwn.net \
--cc=di.shen@unisoc.com \
--cc=jiangshanlai@gmail.com \
--cc=ke.wang@unisoc.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=xuewen.yan94@gmail.com \
--cc=xuewen.yan@unisoc.com \
--cc=yanjiewtw@gmail.com \
/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®