[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250128090737.GX7145@noisy.programming.kicks-ass.net>
Date: Tue, 28 Jan 2025 10:07:37 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: John Stultz <jstultz@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
Stephen Boyd <sboyd@...nel.org>, Yury Norov <yury.norov@...il.com>,
Bitao Hu <yaoma@...ux.alibaba.com>,
Andrew Morton <akpm@...ux-foundation.org>, kernel-team@...roid.com
Subject: Re: [RFC][PATCH 2/3] time/tick: Introduce a dyn_hz boot option
On Mon, Jan 27, 2025 at 10:32:54PM -0800, John Stultz wrote:
> Introduce dyn_hz= option, which allows the actual timer tick to
> be scaled down at boot time.
>
> This allows kerenls to be built with HZ=1000 but systems to
> effectively run as if HZ=100 if specified.
>
> The system will still run with the configured HZ value, but
> ticks will just arrive "late".
>
> The valid values are between 100 and the build time CONFIG_HZ
> value.
>
> Signed-off-by: John Stultz <jstultz@...gle.com>
> ---
> include/linux/tick.h | 11 +++++++++--
> kernel/Kconfig.hz | 9 +++++++++
> kernel/time/tick-common.c | 30 ++++++++++++++++++++++++++++++
> kernel/time/tick-sched.c | 4 ++--
> 4 files changed, 50 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/tick.h b/include/linux/tick.h
> index b8ddc8e631a3c..734ee1e08c9ef 100644
> --- a/include/linux/tick.h
> +++ b/include/linux/tick.h
> @@ -14,6 +14,13 @@
> #include <linux/rcupdate.h>
> #include <linux/static_key.h>
>
> +#ifdef CONFIG_DYN_HZ
> +extern long long dyn_tick_nsec;
> +#define DYN_TICK_NSEC (dyn_tick_nsec)
> +#else
> +#define DYN_TICK_NSEC TICK_NSEC
> +#endif
My git-grep TICK_NSEC spies a whole bunch of TICK_NSEC users that seem
sad now.
That is, why don't they all need updating?
Powered by blists - more mailing lists