Re: [PATCH] Kconfig.hz: Change default HZ to 1000

David Laight
2025-03-02T12:05:34Z

On Fri, 28 Feb 2025 11:33:04 +0100
Attila Fazekas <afazekas@redhat.com> wrote:

> The 250Hz was set as a middle ground.
>
> There are still workloads which sensitive to cache misses
> and to the time spent in ticks.
>
> You still can loose ~1% performance with higher Hz,
> It might not sound much, but if you are running thousands
> of servers 1% loss can be a high cost.
>
> There are many workloads out there where 100Hz is the better choice.

Are there are real issues with changing HZ to 1000, but adding an option
for the timer tick interval (in ms).
So 'jiffies' would always count milliseconds.
That would make is easy to make the actual 'clock tick' be boot time
selectable (or run-time if you get brave!).
The 'timer wheel' code would really need to work on actual ticks,
but I doubt nothing else cares.

That would allow HZ be the same for all architectures, even though
m68k might really want a 50Hz interrupt.

That is much better than any plan to make HZ a variable - which will
bloat code (and with divisions) and not be valid for static initialisers.

David