hardclock() sources

From: Peter Jeremy <peterjeremy_at_optushome.com.au>
Date: Wed, 6 May 2009 20:13:02 +1000
Currently, FreeBSD uses the LAPIC timer to derive both hardclock()
and statclock()/profclock() if it exists, otherwise it uses the
8254 and RTC.  This presents a problem for using C3 - which stops
the LAPIC clock.

Some time ago, ariff_at_ produced a patch to work around a similar
problem with C1E on some AMD Turion CPUs:
http://people.freebsd.org/~ariff/misc/idlecpu_apic_5.diff

A better solution would seem to be to use a HPET periodic timer.  Is
there a particular reason why code to (at least optionally) support
HPET as the timer interrupt hasn't been written?  Looking back through
the archives, pkh_at_ has made disparaging remarks about the actual
usefulness of HPET (as against the Intel documentation) but I can't
find anything that actually talks about using it.

Note that supporting HPET as a timer source would provide at least
some of the infrastructure that will be needed for a future tickless
kernel.

-- 
Peter Jeremy

Received on Wed May 06 2009 - 08:13:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC