From: john stultz <johnstul@us.ibm.com>
To: dean gaudet <dean-list-linux-kernel@arctic.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] prefer TSC over PM Timer
Date: Mon, 15 Nov 2004 17:38:24 -0800 [thread overview]
Message-ID: <1100569104.21267.58.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0411151531590.22091@twinlark.arctic.org>
On Mon, 2004-11-15 at 16:23, dean gaudet wrote:
> i've heard other folks have independently run into this problem -- in fact
> i see the most recent fc2 kernels already do this. i'd like this to be
> accepted into the main kernel though.
>
> the x86 PM Timer is an order of magnitude slower than the TSC for
> gettimeofday calls. i'm seeing 8%+ of the time spent doing gettimeofday
> in someworkloads... and apparently kernel.org was seeing 80% of its time
> go to gettimeofday during the fc3-release overload. PM timer is also less
> accurate than TSC.
>
> i can see a vague argument around cpufreq / tsc troubles, but i'm having a
> hell of a time getting a centrino box to show any TSC troubles even while
> i induce workloads that cause cpufreq to bounce the frequency around.
> maybe someone could give an example of it failing...
I understand your frustration.
While there are a great number of systems that can use the TSC, cpufreq
scaling laptops, and a number of SMP and NUMA systems cannot use it as a
time source. Additinoally its difficult to detect when its wrong as
there are a reasonable number of systems that frequently miss timer
ticks. Although it is much slower, ACPI PM is just more reliable across
the broad spectrum of systems.
With your patch, ACPI PM would never be selected (as TSC always wins
when available, and it will be available on all ACPI enabled i386
systems). So its just the same as disabling CONFIG_X86_PM_TIMER, so why
not just do that?
Do note, using the "clock=tsc" boot option, you can easily force the
system to use the TSC.
> note: when timer_tsc discovers inaccuracy after boot it falls back to
> timer_pit ... timer_pit is twice as expensive as timer_pm, and it'd be
> cool if timer_tsc could fall back to timer_pm... but by that point in time
> all the __init stuff is gone, so i can't see how to init timer_pm. this
> would be a more ideal solution.
Well, the lost-ticks/pit fallback code isn't all that robust. We have
two unreliable time sources where we try to sort out which one is wrong
by using the other. I worry we'd have to implement something like NTP in
the kernel in order to correctly choose the best working time source.
I would however, support a patch that selected the TSC over the ACPI PM
time source when CONFIG_CPUFREQ and CONFIG_SMP were N. That's fairly
safe.
thanks
-john
next prev parent reply other threads:[~2004-11-16 1:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 0:23 dean gaudet
2004-11-16 1:38 ` john stultz [this message]
2004-11-16 3:21 ` dean gaudet
2004-11-16 9:50 ` john stultz
2004-11-16 20:29 ` Dominik Brodowski
2004-11-16 21:06 ` john stultz
2004-11-16 8:11 ` Arjan van de Ven
2004-11-16 9:36 ` john stultz
2004-11-17 15:25 ` Alan Cox
2004-11-17 15:25 ` Alan Cox
2004-11-17 17:23 ` Chris Friesen
2004-11-16 18:27 Pallipadi, Venkatesh
2004-11-17 1:50 ` dean gaudet
2004-11-17 10:43 ` Mikael Pettersson
2004-11-17 14:19 ` Dmitry Torokhov
2004-11-17 15:31 ` Alan Cox
2004-11-18 2:01 ` Krzysztof Halasa
2004-11-17 15:08 Pallipadi, Venkatesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1100569104.21267.58.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=dean-list-linux-kernel@arctic.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®