Re: [PATCH v3] clocksource: Scale the max retry number of watchdog read according to CPU numbers

From: Thomas Gleixner
Date: Mon Feb 19 2024 - 06:32:15 EST


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,

tglx