From: Pasha Tatashin <pasha.tatashin@oracle.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com,
hpa@zytor.com
Subject: Re: [v1 0/9] Early boot time stamps for x86
Date: Thu, 23 Mar 2017 10:39:10 -0400 [thread overview]
Message-ID: <0a628969-e4f6-a463-04e5-889e7b423602@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1703231146060.3982@nanos>
Hi Thomas,
Thank you very much for looking at this patchset. Comments below:
On 03/23/2017 06:56 AM, Thomas Gleixner wrote:
> On Wed, 22 Mar 2017, Pasha Tatashin wrote:
>> Yes, I am certain it is 0 or near 0 on reset on this machine. Because, I
>
> Emphasis on "this machine'
>
> It's not guaranteed especially not on reboot and not with creative BIOSes
> fiddling with the TSC_ADJUST value.
>
> - It CANNOT be used to measure BIOS boot time reliably
Yes, understood, I will remove comment about BIOS time from the next
cover letter.
However, I think the pr_info() with offset is still useful at least for
those whose BIOS does not alter TSC_ADJUST, also it is consisten with
every other clocksource in linux where offset is printed in pr_info().
From Intel PRM 2016/12:
The time-stamp counter (as implemented in the P6 family, Pentium,
Pentium M, Pentium 4, Intel Xeon, Intel Core Solo and Intel Core Duo
processors and later processors) is a 64-bit counter that is set to 0
following a RESET of the processor
Since early boot time stamps feature target processors that are later
than "Pentium 4" because invariant TSC flag is checked, it is safe to
assume that offset is going to be valid on power-on if TSC_ADJUST was
not altered
>
> - If BIOS wreckaged TSC_ADJUST, then your whole time stamping goes out the
> window once the kernel sanitized it.
I will add a condition to tsc_early_init() to check for TSC_ADJUST if it
is not 0, disable early TSC feature. Does this sound OK?
Thank you,
Pasha
next prev parent reply other threads:[~2017-03-23 14:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 20:24 Pavel Tatashin
2017-03-22 20:24 ` [v1 1/9] sched/clock: broken stable to unstable transfer Pavel Tatashin
2017-03-27 10:27 ` [tip:sched/urgent] sched/clock: Fix " tip-bot for Pavel Tatashin
2017-03-22 20:24 ` [v1 2/9] sched/clock: interface to allow timestamps early in boot Pavel Tatashin
2017-03-22 20:24 ` [v1 3/9] x86/cpu: determining x86 vendor early Pavel Tatashin
2017-03-22 20:24 ` [v1 4/9] x86/tsc: early MSR-based CPU/TSC frequency discovery Pavel Tatashin
2017-03-22 20:24 ` [v1 5/9] x86/tsc: disable early messages from quick_pit_calibrate Pavel Tatashin
2017-03-22 20:24 ` [v1 6/9] x86/tsc: use cpuid to determine TSC frequency Pavel Tatashin
2017-03-22 20:24 ` [v1 7/9] x86/tsc: use cpuid to determine CPU frequency Pavel Tatashin
2017-03-22 20:24 ` [v1 8/9] x86/tsc: tsc early Pavel Tatashin
2017-03-24 5:38 ` kbuild test robot
2017-03-22 20:24 ` [v1 9/9] x86/tsc: use " Pavel Tatashin
2017-03-22 20:27 ` [v1 0/9] Early boot time stamps for x86 Peter Zijlstra
2017-03-23 0:02 ` Pasha Tatashin
2017-03-22 20:28 ` Peter Zijlstra
2017-03-22 23:59 ` Pasha Tatashin
2017-03-23 10:56 ` Thomas Gleixner
2017-03-23 14:39 ` Pasha Tatashin [this message]
2017-03-23 18:40 ` Thomas Gleixner
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=0a628969-e4f6-a463-04e5-889e7b423602@oracle.com \
--to=pasha.tatashin@oracle.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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®