lkml.org 
[lkml]   [2017]   [Sep]   [27]   [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
Hi Russell,

This might be so for ARM, and in fact if you look at my SPARC
implementation, I simply made source clock initialize early, so regular
sched_clock() is used. As on SPARC, we use either %tick or %stick
registers with frequency determined via OpenFrimware. But, on x86 there
are dozen ways clock sources are setup, and some of them available quiet
late in boot because of various dependencies. So, my early clock
initialization for x86 (and expendable to other platforms with unstable
clocks) is to make it available when TSC is available, which is
determined by already existing kernel functionality in
simple_udelay_calibration().

My goal was not to introduce any regressions to the already complex (in
terms of number of branches and loads) sched_clock_cpu(), therefore I
added a new function and avoided any extra branches through out the life
of the system. I could mitigate some of that by using static branches,
but imo the current approach is better.

Pasha

\
 
 \ /
  Last update: 2017-09-27 19:12    [W:0.058 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site