From: Feng Tang <feng.tang@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>,
<paulmck@kernel.org>, Waiman Long <longman@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
<linux-kernel@vger.kernel.org>, Jin Wang <jin1.wang@intel.com>
Subject: Re: [PATCH v3] clocksource: Scale the max retry number of watchdog read according to CPU numbers
Date: Mon, 19 Feb 2024 22:37:01 +0800 [thread overview]
Message-ID: <ZdNnjdNTjtvpbGH0@feng-clx.sh.intel.com> (raw)
In-Reply-To: <87msrwadvu.ffs@tglx>
Hi Thomas,
On Mon, Feb 19, 2024 at 12:32:05PM +0100, Thomas Gleixner wrote:
> On Mon, Jan 29 2024 at 21:45, Feng Tang wrote:
> > +static inline long clocksource_max_watchdog_read_retries(void)
> > +{
> > + long max_retries = max_cswd_read_retries;
> > +
> > + if (max_cswd_read_retries <= 0) {
> > + /* santity check for user input value */
> > + if (max_cswd_read_retries != -1)
> > + pr_warn_once("max_cswd_read_retries was set with an invalid number: %ld\n",
> > + max_cswd_read_retries);
> > +
> > + max_retries = ilog2(num_online_cpus()) + 1;
>
> I'm getting tired of these knobs and the horrors behind them. Why not
> simply doing the obvious:
>
> retries = ilog2(num_online_cpus()) + 1;
>
> and remove the knob alltogether?
Thanks for the suggestion! Yes, this makes sense to me. IIUC, the
'max_cswd_read_retries' was introduced mainly to cover different
platforms' requirement, which could now be covered by the new
self-adaptive number.
If there is no concern from other developers, I will send a new
version in this direction.
Thanks,
Feng
>
> Thanks,
>
> tglx
next prev parent reply other threads:[~2024-02-19 14:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 13:45 Feng Tang
2024-01-30 13:55 ` Paul E. McKenney
2024-01-31 0:53 ` Waiman Long
2024-02-19 11:32 ` Thomas Gleixner
2024-02-19 14:37 ` Feng Tang [this message]
2024-02-20 2:20 ` Waiman Long
2024-02-20 15:24 ` Paul E. McKenney
2024-02-20 15:27 ` Feng Tang
2024-02-20 17:09 ` Paul E. McKenney
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=ZdNnjdNTjtvpbGH0@feng-clx.sh.intel.com \
--to=feng.tang@intel.com \
--cc=jin1.wang@intel.com \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome