[lkml]   [2002]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: do_gettimeofday vs. rdtsc in the scheduler
    "David S. Miller" <> writes:

    > From: john stultz <>
    > Date: 17 Sep 2002 13:29:18 -0700
    > Some NUMA boxes do not have synced TSC, so on those systems your
    > code won't work.
    > It would have been really nice if x86 had specified a "system tick"
    > register that incremented based upon the system bus cycles and thus
    > were immune the processor rates.

    It has - the local APIC timer. It has a tick register too that you can
    read. Unfortunately it's buggy/unreliable on many systems. Linux uses
    it for task scheduling and the local timer interrupt when it works,
    but it's not really good enough for gettimeofday.

    Microsoft/Intel have specified the HPET timer as replacement, but
    it is still missing in many chipsets and buggy in others.

    Also reading HPET is somewhat more costly than reading TSCs because it
    goes to the southbridge, so there are cases where using TSC is
    probably better (e.g. I think for networking packet time stamping the
    TSC is just fine with all its limitations)

    > I foresee lots of patches coming which basically are "how does this
    > x86 system provide a stable synchronized tick source".

    From those who didn't implement HPET but some own spec like IBM.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:45    [W:0.020 / U:112.064 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site