Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

Jesper Juhl
2005-07-15T00:05:28Z

On 7/13/05, Chris Wedgwood <cw@f00f.org> wrote:
> On Wed, Jul 13, 2005 at 01:48:57PM -0700, Andrew Morton wrote:
>
> > Len Brown, a year ago: "The bottom line number to laptop users is
> > battery lifetime. Just today somebody complained to me that Windows
> > gets twice the battery life that Linux does."
>
> It seems the motivation for lower HZ is really:
>
> (1) ACPI/SMM suckage in laptops
>
> (2) NUMA systems with *horrible* remote memory latencies
>
> Both can be detected from you .config and we could see HZ as needed
> there and everyone else could avoid this surely?
>

While reading this thread it occoured to me that perhaps what we
really want (besides sub HZ timers) might be for the kernel to
auto-tune HZ?

Would it make sense to introduce a new config option (say
CONFIG_HZ_AUTO) that when selected does something like this at boot:

if (running_on_a_laptop()) {
set_HZ_to(250);
} else if (running_on_large_NUMA_box()) {
set_HZ_to_100();
} else if (running_on_multimedia_box() {
set_HZ_to_1000();
} else {
set_HZ_to_some_other_sane_default();
}

and if user wants to not use the auto detection they can select a
certain HZ in their .config instead of CONFIG_HZ_AUTO.

Just wanted to throw the idea up in the air in case it made sense.
Feel free to pick it apart or simply ignore it. :-)

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html