Re: Why HZ on i386 is 100 ?

From: george anzinger (george@mvista.com)
Date: Tue Apr 23 2002 - 14:24:06 EST


Andi Kleen wrote:
>
> Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>
> > > The problem is in accounting (or time slicing if you prefer) where we
> > > need to start a timer each time a task is context switched to, and stop
> > > it when the task is switched away. The overhead is purely in the set up
> > > and tear down. MOST of these never expire.
> >
> > Done properly on many platforms a variable tick is very very easy and also
> > very efficient to handle. X86 is a paticular problem case because the timer
> > is so expensive to fiddle with
>
> Depends. On modern x86 you can either use the local APIC timer or
> the mmtimers (ftp://download.intel.com/ial/home/sp/mmts097.pdf -
> should be in newer x86 chipsets). Both should be better than the
> 8254 timer and are also not expensive to work with.

I just looked at the mmtimers. Looks like the right idea but a bit
overblown. I would prefer an interrupt generated by a compare to the
TSC all on board the cpu chip. This would eliminate the I/O overhead.
Still the 8-bit PIT is the pits.

When can we expect to see this in a real cpu?

-g
>
> -Andi
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:36 EST