lkml.org 
[lkml]   [2017]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [v3 1/2] sched/clock: interface to allow timestamps early in boot
From
Date
Hi Dou,

Thank you for your comments:

>> {
>> x86_init.timers.timer_init();
>> tsc_init();
>> + tsc_early_fini();
>
> tsc_early_fini() is defined in patch 2, I guess you may miss it
> when you split your patches.

Indeed, I will move it to patch 2.

>> +static DEFINE_STATIC_KEY_TRUE(__use_sched_clock_early);
>> +static bool __read_mostly sched_clock_early_running;
>> +
>
> In my opinion, these two parameters are repetitive, I suggest remove
> one.
>
> eg. remove sched_clock_early_running like below
> First, static DEFINE_STATIC_KEY_FALSE(__use_sched_clock_early);

We can't change the static branches before jump_label_init() is called,
and we start early boot timestamps before that

This is why having two booleans is appropriate: one that can be changed
early in boot, and another to patch the hotcode in order to keep good
performance after boot.

I will update comment before __use_sched_clock_early explaining the
reason why we need two of them.

Thank you,
Pasha

\
 
 \ /
  Last update: 2017-08-14 17:47    [W:0.055 / U:1.748 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site