Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbdHOJ1X (ORCPT ); Tue, 15 Aug 2017 05:27:23 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:32088 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752574AbdHOJ1W (ORCPT ); Tue, 15 Aug 2017 05:27:22 -0400 X-IronPort-AV: E=Sophos;i="5.41,377,1498492800"; d="scan'208";a="23592902" Subject: Re: [v3 1/2] sched/clock: interface to allow timestamps early in boot To: Pasha Tatashin , , , , , , 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> <2043c873-1d94-8897-bbaa-bd1b82640652@oracle.com> From: Dou Liyang Message-ID: <90a4d2f2-a0ad-dc6b-18be-765fc0a05418@cn.fujitsu.com> Date: Tue, 15 Aug 2017 17:27:12 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2043c873-1d94-8897-bbaa-bd1b82640652@oracle.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 0CD684724391.AC460 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 49 Hi Pasha, At 08/14/2017 11:44 PM, Pasha Tatashin wrote: > 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 > I understood, I was wrong, thanks for your explanation. Thanks dou. > 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 > > >