Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1740893

Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early in boot

From Pasha Tatashin <pasha.tatashin@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early in boot
Date 2017-09-27 19:20 +0200
Message-ID <uuoa5-60L-1@gated-at.bofh.it> (permalink)
References <ukfB7-3fk-11@gated-at.bofh.it> <ukfB8-3fk-31@gated-at.bofh.it> <uulOW-4rv-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early  in boot Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-09-27 16:50 +0200
  Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early  in boot Pasha Tatashin <pasha.tatashin@oracle.com> - 2017-09-27 19:20 +0200
  Re: [PATCH v6 1/4] sched/clock: interface to allow timestamps early  in boot Peter Zijlstra <peterz@infradead.org> - 2017-09-27 20:20 +0200

csiph-web