HZ option [Was: Re: custom kernel + if_xl + error]

Peter Jeremy PeterJeremy at optushome.com.au
Sun Sep 4 12:29:04 PDT 2005


On Sun, 2005-Sep-04 04:27:24 +0200, Emanuel Strobl wrote:
>standard. Here's what my non-acpi/apic system (486 at 133MHz) says:
>kern.clockrate: { hz = 1000, tick = 1000, profhz = 1024, stathz = 128 }
>And here from my 1GHz Celeron with acpi and apic:
>kern.clockrate: { hz = 1000, tick = 1000, profhz = 666, stathz = 133 }
>
>Can somebody eplain the profhz to me? Especially why it's higher on the 
>much slower machine...

On your older system, profhz and stathz are driven the RTC interrupts
and tick is driven by the 8254.  On your newer system all the clocks
are derived from the LAPIC timer running at 2000Hz - tick is LAPIC/2,
profhz is LAPIC/3 and stathz is LAPIC/15.

The actual values of profhz and stathz are unimportant, their primary
purpose is to sample the system state at a rate that is difficult for
processes to synchronize with.  If a process synchronizes with the
profiling/statistics clock then the statistics become unreliable (and
a process can cheat the scheduler by appearing to use no CPU time).

-- 
Peter Jeremy


More information about the freebsd-current mailing list