lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250128193017.GE7145@noisy.programming.kicks-ass.net>
Date: Tue, 28 Jan 2025 20:30:17 +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 Tue, Jan 28, 2025 at 09:29:30AM -0800, John Stultz wrote:
> On Tue, Jan 28, 2025 at 1:07 AM Peter Zijlstra <peterz@...radead.org> wrote:
> > On Mon, Jan 27, 2025 at 10:32:54PM -0800, John Stultz wrote:
> > > +#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?
> 
> Thanks for taking a look, Peter!
> 
> So TICK_NSEC is still the length of the HZ tick. The idea with this
> series is we're leaving HZ as a high frequency, but then just
> programming the interrupt to come in at a lower frequency.

That's word salad. Either the timer is slower, as alluded to below, or
it is not. It can't be both.

> So it's only the logic involved in setting the next interrupt, where
> we need to use DYN_TICK_NSEC.

In other words, the actual interrupts will happen dyn_tick_nsec apart,
not TICK_NSEC.

This means that pretty much every TICK_NSEC user in kernel/events/ is
now wrong. They're assuming the time between interrupts is TICK_NSEC --
we even inhibit NOHZ for perf to ensure this.

Really, you need to audit each and every TICK_NSEC users at the very
least.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ