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


Groups > linux.kernel > #1711055

Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Pasha Tatashin <pasha.tatashin@oracle.com>
Newsgroups linux.kernel
Subject Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot
Date Mon, 14 Aug 2017 17:50:02 +0200
Message-ID <uepMS-5WA-19@gated-at.bofh.it> (permalink)
References <udnk6-76s-7@gated-at.bofh.it> <udnk5-76s-5@gated-at.bofh.it> <uefkt-7Y4-5@gated-at.bofh.it>
X-Original-To Dou Liyang <douly.fnst@cn.fujitsu.com>, x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version 1.0
Content-Type text/plain; charset=gbk; format=flowed
Content-Language en-US
Content-Transfer-Encoding 7bit
X-Source-IP userv0021.oracle.com [156.151.31.71]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 36
Organization linux.* mail to news gateway
X-Original-Date Mon, 14 Aug 2017 11:44:56 -0400
X-Original-Message-ID <2043c873-1d94-8897-bbaa-bd1b82640652@oracle.com>
X-Original-References <1502477455-314781-1-git-send-email-pasha.tatashin@oracle.com> <1502477455-314781-2-git-send-email-pasha.tatashin@oracle.com> <966f910e-f6be-f4df-2600-37133075dbde@cn.fujitsu.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1711055

Show key headers only | View raw


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

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


Thread

Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-08-14 06:40 +0200
  Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot Pasha Tatashin <pasha.tatashin@oracle.com> - 2017-08-14 17:50 +0200
    Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-08-15 11:30 +0200

csiph-web