From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964950AbdKCB7A (ORCPT ); Thu, 2 Nov 2017 21:59:00 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:33154 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932461AbdKCB67 (ORCPT ); Thu, 2 Nov 2017 21:58:59 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29860726" Subject: Re: [PATCH v7 1/6] x86/tsc: remove tsc_disabled flag To: Pavel Tatashin , , , , , , , , , , , , References: <20171102172644.28555-1-pasha.tatashin@oracle.com> <20171102172644.28555-2-pasha.tatashin@oracle.com> From: Dou Liyang Message-ID: Date: Fri, 3 Nov 2017 09:58:51 +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: <20171102172644.28555-2-pasha.tatashin@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: 03BC048089CF.AEAA2 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 Hi Pavel, At 11/03/2017 01:26 AM, Pavel Tatashin wrote: > tsc_disabled is set when notsc is passed as kernel parameter. The reason we > have notsc is to avoid timing problems on multi-preccors systems. However, > we already have a mechanism to detect and resolve these issues by invoking > tsc unstable path. > > Signed-off-by: Pavel Tatashin > --- > arch/x86/kernel/tsc.c | 17 +++-------------- > 1 file changed, 3 insertions(+), 14 deletions(-) > > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c > index 796d96bb0821..1c4502a2b7b2 100644 > --- a/arch/x86/kernel/tsc.c > +++ b/arch/x86/kernel/tsc.c > @@ -37,11 +37,6 @@ EXPORT_SYMBOL(tsc_khz); > */ > static int __read_mostly tsc_unstable; > > -/* native_sched_clock() is called before tsc_init(), so > - we must start with the TSC soft disabled to prevent > - erroneous rdtsc usage on !boot_cpu_has(X86_FEATURE_TSC) processors */ > -static int __read_mostly tsc_disabled = -1; > - > static DEFINE_STATIC_KEY_FALSE(__use_tsc); > > int tsc_clocksource_reliable; > @@ -248,7 +243,7 @@ EXPORT_SYMBOL_GPL(check_tsc_unstable); > int __init notsc_setup(char *str) > { > pr_warn("Kernel compiled with CONFIG_X86_TSC, cannot disable TSC completely\n"); IMO, this warning may make users confused, could we remove it from here? Thanks, dou.