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

Jesper Juhl
2005-07-15T13:12:57Z

On 7/15/05, Linus Torvalds <torvalds@osdl.org> wrote:
>
> On Fri, 15 Jul 2005, Jesper Juhl wrote:
> >
> > It's buggy, that I know. setting kernel_hz (the new boot parameter) to
> > 250 causes my system clock to run at something like 4-5 times normal
> > speed
>
> 4 times normal. You don't actually make the timer interrupt happen at
> 250Hz, so the timer will be programmed to run at the full 1kHz.
>
Right, that's the basic problem. I increase jiffies at a higher rate
but didn't slow the timer interrupt down at the same time.

> You also need to actually change the LATCH define (in
> include/linux/jiffies.h) to take this into account (there might be
> something else too).
>
[...]
> and you might be getting closer.
>
> Of course, you need to make sure that LATCH is used only after
> jiffies_increment is set up. See "setup_pit_timer(void)" in
> arch/i386/kernel/timers/timer_pit.c for more details.
>

Thank you for all the pointers and hints. This is a new area of code
for me, so I'll need some time to poke around - the above helps a lot.
Unfortunately I won't have any time to work on this today, but I'll
see if I can get a working implementation together tomorrow.

--
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