Re: [PATCH v12 10/11] sched: early boot clock

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 07:27:05AM -0400, Pavel Tatashin wrote: > We start getting timer interrupts. Is it acceptable to move > sched_clock_init() after late_time_init()? After much puzzling and cursing, yes, I suppose that'll work.

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-26 Thread Pavel Tatashin
On Tue, Jun 26, 2018 at 7:29 AM Pavel Tatashin wrote: > > > > > How's something like this? That moves sched_clock_init() to right before > > we enable IRQs for the first time (which is after we've started the > > whole timekeeping business). > > > > The thing is, sched_clock_init_late() reall is f

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-26 Thread Pavel Tatashin
> > How's something like this? That moves sched_clock_init() to right before > we enable IRQs for the first time (which is after we've started the > whole timekeeping business). > > The thing is, sched_clock_init_late() reall is far too late, we need to > switch to unstable before we bring up SMP

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-26 Thread Peter Zijlstra
On Mon, Jun 25, 2018 at 03:23:20PM -0400, Pavel Tatashin wrote: > Unfortunatly the above suggestion won't work. And here is why. > > We have a call sequence like this: > > start_kernel > sched_init() > sched_clock_init() >In this call sched_clock_running is set to 1. Which

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-25 Thread Pavel Tatashin
Hi Peter, I have revisted this patch after modifying x86 sched_clock() to contigously output tsc once it is setup early in boot, based on the latest suggestions from Thomas. On 18-06-25 10:55:43, Peter Zijlstra wrote: > On Thu, Jun 21, 2018 at 05:25:17PM -0400, Pavel Tatashin wrote: > > Allow sch

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-25 Thread Pavel Tatashin
On Mon, Jun 25, 2018 at 4:56 AM Peter Zijlstra wrote: > > On Thu, Jun 21, 2018 at 05:25:17PM -0400, Pavel Tatashin wrote: > > Allow sched_clock() to be used before schec_clock_init() and > > sched_clock_init_late() are called. This provides us with a way to get > > early boot timestamps on machine

Re: [PATCH v12 10/11] sched: early boot clock

2018-06-25 Thread Peter Zijlstra
On Thu, Jun 21, 2018 at 05:25:17PM -0400, Pavel Tatashin wrote: > Allow sched_clock() to be used before schec_clock_init() and > sched_clock_init_late() are called. This provides us with a way to get > early boot timestamps on machines with unstable clocks. There are !x86 architectures that use th

[PATCH v12 10/11] sched: early boot clock

2018-06-21 Thread Pavel Tatashin
Allow sched_clock() to be used before schec_clock_init() and sched_clock_init_late() are called. This provides us with a way to get early boot timestamps on machines with unstable clocks. Signed-off-by: Pavel Tatashin --- kernel/sched/clock.c | 10 -- 1 file changed, 8 insertions(+), 2 d