From: Tejun Heo <tj@kernel.org>
To: Xuewen Yan <xuewen.yan@unisoc.com>
Cc: jiangshanlai@gmail.com, corbet@lwn.net, paulmck@kernel.org,
rdunlap@infradead.org, peterz@infradead.org, yanjiewtw@gmail.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
ke.wang@unisoc.com, xuewen.yan94@gmail.com
Subject: Re: [PATCH] workqueue: Control the frequency of intensive warning through cmdline
Date: Tue, 20 Feb 2024 06:46:18 -1000 [thread overview]
Message-ID: <ZdTXWrB8dascOIM_@slm.duckdns.org> (raw)
In-Reply-To: <20240219074634.2039-1-xuewen.yan@unisoc.com>
Hello,
On Mon, Feb 19, 2024 at 03:46:34PM +0800, Xuewen Yan wrote:
> +#ifdef CONFIG_WQ_CPU_INTENSIVE_REPORT
> +static unsigned int wq_cpu_intensive_warning_per_count = 4;
> +module_param_named(cpu_intensive_warning_per_count, wq_cpu_intensive_warning_per_count, uint, 0644);
> +#endif
wq_cpu_intensive_warning_nth is probably shorter and more idiomatic.
> @@ -1202,7 +1206,7 @@ static void wq_cpu_intensive_report(work_func_t func)
> * exponentially.
> */
> cnt = atomic64_inc_return_relaxed(&ent->cnt);
> - if (cnt >= 4 && is_power_of_2(cnt))
> + if (wq_cpu_intensive_warning_per_count && !(cnt % wq_cpu_intensive_warning_per_count))
But aren't you mostly interested in the first report? Note that these events
can be very high frequency and reporting every nth event can lead to a lot
of constant warnings. Wouldn't it make sense to keep the exponential backoff
while allowing adjusting the initial threshold?
Thanks.
--
tejun
next prev parent reply other threads:[~2024-02-20 16:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 7:46 [PATCH] workqueue: Control the frequency of intensive warning through cmdline Xuewen Yan
2024-02-19 16:00 ` Randy Dunlap
2024-02-20 16:46 ` Tejun Heo [this message]
2024-02-21 2:01 ` Xuewen Yan
2024-02-21 5:44 ` Tejun Heo
2024-02-21 11:00 ` Xuewen Yan
2024-02-21 17:44 ` Tejun Heo
2024-02-22 1:52 ` Xuewen Yan
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=ZdTXWrB8dascOIM_@slm.duckdns.org \
--to=tj@kernel.org \
--cc=corbet@lwn.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.