On 02/02/06 23:22, Jonathan Adams wrote:
On Thu, Feb 02, 2006 at 03:01:12PM -0800, Roman wrote:

I thought an OS kernel was supposed to synchronise hardware counters
on multiple CPUs when it was loading??


It does when it can.  On x86 hardware, depending on how the BIOS sets things
up, it can be impossible.  On Sparc, there *will* be a tick register that
is synchronized across all chips, but it may not be %tick;  for USIII and
greater, it's %stick (shared tick), an MSR.

%stick is bumped from a common clock so they increment in step;  however the
initial values of %stick can't be guaranteed to be the same across all cpus - 
instead
there may be a discrepancy of 1 or 2.  This is because software is used to
perform the sync and we have various clocks in play - cpu, system bus, and stick
frequencies.  That's why GETHRIME and it's ilk zero any small negative value 
when they
subtract from %stick the hrtime_base.

Gavin
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to