mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Stultz <jstultz@google.com>,
	Thomas Gleixner <tglx@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] sched/tick: Decouple sched_tick() from HZ
Date: Sun, 17 May 2026 17:09:22 +0100	[thread overview]
Message-ID: <20260517170922.0bd83513@pumpkin> (raw)
In-Reply-To: <20260517154401.5b5qk3ixujsbkqhx@airbuntu>

On Sun, 17 May 2026 16:44:01 +0100
Qais Yousef <qyousef@layalina.io> wrote:

> On 05/17/26 15:10, David Laight wrote:
> > On Sun, 17 May 2026 05:07:37 +0100
> > Qais Yousef <qyousef@layalina.io> wrote:
> >   
> > > Previous attempt to make HZ 1000 the default [1] to help with scheduler
> > > responsiveness didn't get merged. But maybe for the best, as I think this idea
> > > of decoupling sched_tick() from HZ makes more sense. We shouldn't need to make
> > > a choice between how often timers should trigger vs how often should the
> > > scheduler update its stats/take decisions.  
> > 
> > Have you also looked a decoupling HZ/jiffies from the timer interrupt rate?
> > It ought to be reasonable set HZ to 1000 and to do 'jiffies += 4' when the
> > timer interrupts 250 times a second.
> > I'd expect most code to handle that fine.  
> 
> John actually had a stab at that [1].

I'd forgotten about that - even though I commented :-)

> I am not sure we can fully say we don't care about what TICK_NSEC means. And
> all the open coding with HZ.
> 
> I don't see value in the overall potential treewide conversion and the
> potential compile time math becoming 'runtime overhead' complaint someone might
> throw out.

If HZ is fixed at 1000 then there is no extra maths.

> I did have a stab at making HZ a variable and update TICK_NSEC to depend on it.

I do remember that, and thinking it would add a lot of extra maths.

...
> > I know one architecture (forgotten which) traditionally used a 1024Hz clock,
> > and some very old ones 60Hz; but I don't think Linux supports either.  
> 
> Personally I think HZ=1000 is the only sensible option. But I am not going to
> fight this battle :)

I go for only allowing values that divide evenly into 1000.
That really only gives you interrupt rates of 1000Hz, 500Hz, 250Hz, 200Hz
and 100Hz (and maybe 50Hz).

-- David

> 
> [1] https://lore.kernel.org/lkml/20250128063301.3879317-1-jstultz@google.com/


  reply	other threads:[~2026-05-17 16:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-17  4:07 Qais Yousef
2026-05-17  4:07 ` [PATCH 1/3] " Qais Yousef
2026-05-17  4:07 ` [PATCH 2/3] sched/tick: Move TICK_NSEC users to PTICK_NSEC Qais Yousef
2026-05-17  4:07 ` [PATCH 3/3] sched/tick: Turn on PTICK by default Qais Yousef
2026-05-17  4:19 ` [PATCH 0/3] sched/tick: Decouple sched_tick() from HZ Qais Yousef
2026-05-17 14:10 ` David Laight
2026-05-17 15:44   ` Qais Yousef
2026-05-17 16:09     ` David Laight [this message]
2026-05-17 17:26       ` Qais Yousef
2026-05-18  7:40 ` Peter Zijlstra
2026-05-19  0:42   ` Qais Yousef
2026-05-19  9:13     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260517170922.0bd83513@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=frederic@kernel.org \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=rostedt@goodmis.org \
    --cc=tglx@kernel.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome