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: <CANDhNCpf9ZXDF8LmXrUgCHqcC+8e-F8_56uEjmaELvOTQb_r7Q@mail.gmail.com>
Date: Tue, 28 Jan 2025 09:29:30 -0800
From: John Stultz <jstultz@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
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 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.

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

One of the issues I hit and addressed before sending (which I
mentioned in the cover letter), was that previously I was also using
DYN_TICK_NSEC in the periodic tick path, as this approach of skipping
ticks should be usable there. But the problem was since we're using
tick counting there instead of time counting, I didn't have proper
handling for cases where there's a remainder from the HZ/dynHZ value.
So for now I've dropped that and only use this when we're in oneshot
mode.

Let me know if you have other thoughts or concerns!  I'll try to
reword the commit message further to try to better explain this.

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ