[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdNnjdNTjtvpbGH0@feng-clx.sh.intel.com>
Date: Mon, 19 Feb 2024 22:37:01 +0800
From: Feng Tang <feng.tang@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: John Stultz <jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>,
<paulmck@...nel.org>, Waiman Long <longman@...hat.com>, Peter Zijlstra
<peterz@...radead.org>, <linux-kernel@...r.kernel.org>, Jin Wang
<jin1.wang@...el.com>
Subject: Re: [PATCH v3] clocksource: Scale the max retry number of watchdog
read according to CPU numbers
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
Powered by blists - more mailing lists