From: Thomas Gleixner <tglx@linutronix.de>
To: Pavel Machek <pavel@ucw.cz>
Cc: Ingo Molnar <mingo@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Feng Tang <feng.tang@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Fwd: [GIT PULL] timer changes for v3.10
Date: Wed, 8 May 2013 16:34:27 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1305081626110.2863@ionos> (raw)
In-Reply-To: <20130508105542.GA22703@amd.pavel.ucw.cz>
Pavel,
On Wed, 8 May 2013, Pavel Machek wrote:
> > > > Sorry. You seem to not like the merged change, but I guess I'm not
> > > > quite sure what exactly your objection is here.
> > >
> > > I'm not exactly sure what my objections are.
> > >
> > > TSC was not designed for long-term precise timekeeping. [...]
> >
> > The TSC is just a 64-bit counter that can be read very cheaply.
> >
> > If the TSC is _implemented_ precisely in hardware and is kept in sync over
> > CPUs then it's obviously fit for long-term precise timekeeping from that
> > point on.
>
> Yes. But the clock for TSC is not being generated in CPU (right?) and
> AFAICT, the code said "if the CPU is new enough, assume TSC is good
> timesource". You need good clock for good timesource.
TSC is a good clock source if:
- Frequency constant (>= Core2)
- Not affected by C-States (>= Nehalem)
- Running during Suspend (>= Haswell)
So we only use TSC across Suspend for Haswell and newer. On older
systems we use RTC during suspend, but we still use the TSC as a
clocksource during normal operation.
> > > [...] but some people suspend their machines for longer than that. Plus
> > > I wonder how it will interfere with /etc/adjtime.
> >
> > If it's precise then why should it interfere?
> >
> > The history of the TSC being problematic can be ignored the moment CPU
> > makers fix it completely - and apparently that is happening...
>
> AFAICT we normally use RTC/PIT during runtime. If we switch to TSC
No, we do NOT use RTC/PIT during runtime. That's the worst choice one
could make. If TSC is non frequency constant or affected by C-States
we use HPET or PM-Timer, and we only ever use the PIT if nothing else
is available.
RTC is not used at all for timekeeping. RTC is only used at system
start and when we resume and the TSC stopped during that time, which
is true for hibernation even on Haswell and newer.
> during suspend, surely /etc/adjtime will be confused. (RTC has its own
> timesource, so it is unlikely to have same error as TSC).
Nothing gets confused. It's all handled proper in the core code and
the clock source drivers.
Thanks,
tglx
next prev parent reply other threads:[~2013-05-08 14:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 7:43 [GIT PULL] timer changes for v3.10 Ingo Molnar
2013-04-30 15:21 ` Linus Torvalds
2013-05-01 10:53 ` Ingo Molnar
2013-05-02 10:22 ` Thomas Gleixner
2013-05-06 23:01 ` Pavel Machek
2013-05-07 0:10 ` John Stultz
[not found] ` <CA++bM2scosWgBpC3_LzcKYOjG4EQQzN5Vf4rZFds-5qRVRwvDQ@mail.gmail.com>
2013-05-07 2:38 ` Fwd: " Feng Tang
2013-05-07 6:53 ` Ingo Molnar
2013-05-07 7:05 ` Feng Tang
2013-05-07 16:01 ` John Stultz
2013-05-07 17:18 ` Ingo Molnar
2013-05-07 21:31 ` Pavel Machek
2013-05-07 21:39 ` John Stultz
2013-05-07 21:51 ` Pavel Machek
2013-05-08 6:44 ` Ingo Molnar
2013-05-08 10:55 ` Pavel Machek
2013-05-08 14:11 ` Feng Tang
2013-05-08 14:34 ` Thomas Gleixner [this message]
2013-05-08 19:49 ` Pavel Machek
2013-05-09 8:59 ` Ingo Molnar
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=alpine.LFD.2.02.1305081626110.2863@ionos \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=feng.tang@intel.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pavel@ucw.cz \
--cc=torvalds@linux-foundation.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