mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@oracle.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	mingo@redhat.com, Peter Zijlstra <peterz@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [v2 0/9] Early boot time stamps for x86
Date: Sat, 25 Mar 2017 15:45:47 -0400	[thread overview]
Message-ID: <c0f7e0af-8fea-8a2c-d7b6-1313ca96076b@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1703251730090.4363@nanos>

Hi Thomas,

Thank you very much for a very insightful feedback. I will address your 
comments, and if I have any questions, I will ask them before sending 
out the next patchset.

A few replies below:

> First of all, this "solution" is only valid for a very restricted set of
> systems and breaks others in very subtle ways.
>
> FYI, the architecture name is x86, which handles 32bit/64bit, various
> vendors and hypervisors. It's not 'arch/mymachine'.

The reason why I only targeted newer processors and 64-bit platforms was 
because these are the machines that keep growing in size: more memory, 
cpu count etc. Which, means these are the machine where we can get 
scalability problem in the future.

>
> So this needs to be integrated into the existing TSC/CPU calibration
> mechanism which works across all supported systems. And that means, that
> early TSC calibration can't be done before x86_init.oem.arch_setup() and
> hypervisor_init_platform() have been invoked.
>
> By that time, which is still pretty early in the boot process:
>
>       - boot_cpu_data has been preinitialized
>
>       - calibration functions setup has been done

This sounds good. I will sanity check that we do not spend excessive 
amount of time before x86_init.oem.arch_setup() is done on some larger 
machines, and will start early clock sometime after this call is finished.

> Putting the early TSC initialization after hypervisor_init_platform() makes
> this available for _ALL_ systems/platforms as infrastructure and allows the
> platforms to add the required bits of support via a new set of function
> pointers in struct x86_platform_ops, which btw. is a proper form of
> abstraction.

Ok

> The time between x86_64_start_kernel() and that point is in the low single
> digit millisecond range or less than a millisecond and therefor completely
> irrelevant. The first timestamps before that point will be 0 as they used
> to be.
>
> You can argue in circles about that, it's simply not debatable.

Sure, I tried perfection by having timestamps available with the first 
log message, but your proposed practicality makes sense.

> But that's only the sched clock part of the problem. If this early
> sched_clock() is available, then this needs to be fed into the setup of
> timekeeping as well, otherwise dmesg tells 50 seconds into boot and clock
> monotonic/boottime say 5, which would be confusing at best. That has not be
> solved in the first step, but definitely before something like this is
> going to be merged.

Thank you for catching this, I will make sure boottime/dmesg times match.

Thank you,
Pasha

      reply	other threads:[~2017-03-25 19:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 15:21 Pavel Tatashin
2017-03-24 15:21 ` [v2 1/9] sched/clock: broken stable to unstable transfer Pavel Tatashin
2017-03-24 15:21 ` [v2 2/9] sched/clock: interface to allow timestamps early in boot Pavel Tatashin
2017-03-24 15:21 ` [v2 3/9] x86/cpu: determining x86 vendor early Pavel Tatashin
2017-03-24 15:21 ` [v2 4/9] x86/tsc: early MSR-based CPU/TSC frequency discovery Pavel Tatashin
2017-03-24 15:21 ` [v2 5/9] x86/tsc: disable early messages from quick_pit_calibrate Pavel Tatashin
2017-03-24 15:21 ` [v2 6/9] x86/tsc: use cpuid to determine TSC frequency Pavel Tatashin
2017-03-24 15:21 ` [v2 7/9] x86/tsc: use cpuid to determine CPU frequency Pavel Tatashin
2017-03-24 15:21 ` [v2 8/9] x86/tsc: tsc early Pavel Tatashin
2017-03-24 15:21 ` [v2 9/9] x86/tsc: use " Pavel Tatashin
2017-03-28  1:08   ` [lkp-robot] [x86/tsc] 07e7eaa3bc: BUG:kernel_reboot-without-warning_in_early-boot_stage kernel test robot
2017-03-25 10:25 ` [v2 0/9] Early boot time stamps for x86 Thomas Gleixner
2017-03-25 13:55   ` Pasha Tatashin
2017-03-25 18:36     ` Thomas Gleixner
2017-03-25 19:45       ` Pasha Tatashin [this message]

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=c0f7e0af-8fea-8a2c-d7b6-1313ca96076b@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®