lkml.org 
[lkml]   [2017]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 1/4] sched/clock: interface to allow timestamps early in boot
From
Date
> 
> Urgh, that's horrific.
>
> Can't we simply make sched_clock() go earlier? (we're violating "notsc"
> in any case and really should kill that option).
>
> Then we can do something like so on top...
>

Hi Peter,

I've been thinking about your proposal, and I have one concern:
sched_clock() can be implemented two ways either via
pv_time_ops.sched_clock vectors when CONFIG_PARAVIRT is defined

sched_clock()
paravirt_sched_clock()
PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);

Or native via alias

sched_clock()
native_sched_clock()

Using sched_clock_early() approach makes early time stamps work with
both cases when it is determined that tsc can be used
simple_udelay_calibration(). (As we agreed I am going to change notsc to
use tsc=unstable path.)

It may be not the most efficient clock for some virtualizations to use
rdtsc directly, but since this is for early boot only, and not something
that is going to be used after machine is booted it is OK.

Pavel

\
 
 \ /
  Last update: 2017-10-09 18:37    [W:0.169 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site