Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2004 10:38:29 -0700 (PDT)
From:      Doug White <dwhite@gumbysoft.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Is the TSC timecounter safe on SMP system?
Message-ID:  <20040813103710.F93695@carver.gumbysoft.com>
In-Reply-To: <16668.61707.474283.639200@grasshopper.cs.duke.edu>
References:  <16668.61707.474283.639200@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Aug 2004, Andrew Gallatin wrote:

>
> I have a system where the TSC timecounter is quite a bit more accurate
> (or perhaps its just much cheaper) than the ACPI timecounter.  This is a
> single CPU, HTT system running an SMP kernel.
>
> A simple program which calls gettimeofday() in a tight loop, looking
> for the microseconds to change sees ~998,000 microsecond updates/sec
> with kern.timecounter.hardware=TSC, and 28,500 updates/sec with ACPI-safe.
>
> 1) Is it safe to switch to TSC?

If you like your ticks bouncing around; you'll get different values
depending on which CPU you read.

> 2) If yes, would it be safe to switch to TSC if this was a real
>    SMP system with multiple physical cpus?

TSC in a single-package HTT situation would be interesting to research, if
it is shared across the pipelines.

--
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040813103710.F93695>