Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp598731imm; Wed, 20 Jun 2018 03:38:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJkhrd5eaAJ83ZcShsyUcATW4S97lmO9/I8eTqelDlGcFfE82nFgn6O5VC0/801w4dKwIPv X-Received: by 2002:a65:560f:: with SMTP id l15-v6mr18692416pgs.260.1529491139038; Wed, 20 Jun 2018 03:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529491139; cv=none; d=google.com; s=arc-20160816; b=yW/rUsjwqe/SJWKrgffs8T/bG6U7bKwaSTj1c+SL7tpSFTPIy+g4sHI6sVQjx8aVrB J9Dd13T5yzc/TZsTeclAbgjKSn5l5fbIfWSwM6Q17NGn+3DuTxFIidXDe5oSFx1bWwqP 195Q7+TUOJbIOxDfIRGdyvHeRMBk2bYW6iHtKG5pUWPcYsVauC08lHinUJdIS/IrEb1g YLEZU2LI6hLlOkdPkF0MA0DXdW6zOACLFio3Z5tObcNu2mpk3xLv1X609vEkaN9TS6hg 2ryOphhpOeNclW5PUGBHnGwRzuymMrd487SZhD/cQHhK/ASmWBjfAXTGb1QOqoXNYOcb ltDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=oQSbf9mq2gVVEnpHan7cyVkrN897tzH+2kPbpcRfbbw=; b=zc91MQsc/dhFwLx02gkDQFXIdGslXgjxt21brXnWvUPdnkAYm1AgvNK1Vus3WSQ+4R DfsY4PiZXJKHNpHIqvzS+8LSwgiOgwuDb35USdovRNGDPsU1A9wXxrdovlU7fhWhFUl9 BDdRcti8xnB+wnoiEIznqvR6LKpzBu3EbuikSQLdobHXKl8z6wZ12/4ZNVmAZT2mxLs4 PNjU36XBjcW7GrdMdwe7SGFF8MSKR+5ELwMK4s3INuus35JyO3TpQI1NVR0pav964jfH ey7wDkWr9Y8n7bR5h8km/HgJpJkLyvpQ7S7mbH/tthTK59YEkTFRZSO9ZjdJII5ZXWWF nE0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si2127373pla.78.2018.06.20.03.38.44; Wed, 20 Jun 2018 03:38:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbeFTKg4 (ORCPT + 99 others); Wed, 20 Jun 2018 06:36:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:62775 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753880AbeFTKgz (ORCPT ); Wed, 20 Jun 2018 06:36:55 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2018 03:36:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,246,1526367600"; d="scan'208";a="48515938" Received: from shbuild888.sh.intel.com (HELO localhost) ([10.239.146.239]) by fmsmga007.fm.intel.com with ESMTP; 20 Jun 2018 03:36:51 -0700 Date: Wed, 20 Jun 2018 18:39:05 +0800 From: Feng Tang To: Thomas Gleixner Cc: Pavel Tatashin , steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux@armlinux.org.uk, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, john.stultz@linaro.org, sboyd@codeaurora.org, x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, douly.fnst@cn.fujitsu.com, peterz@infradead.org, prarit@redhat.com, pmladek@suse.com, gnomes@lxorguk.ukuu.org.uk Subject: Re: [PATCH v10 7/7] x86/tsc: use tsc early Message-ID: <20180620103905.s3vmhihbezvkzb5h@shbuild888> References: <20180615174204.30581-1-pasha.tatashin@oracle.com> <20180615174204.30581-8-pasha.tatashin@oracle.com> <20180620101241.5vhmyvdjbenldp4r@shbuild888> <20180620102946.jdvyvv7jvhhjvskv@shbuild888> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 20, 2018 at 12:30:58PM +0200, Thomas Gleixner wrote: > On Wed, 20 Jun 2018, Feng Tang wrote: > > > On Wed, Jun 20, 2018 at 12:16:36PM +0200, Thomas Gleixner wrote: > > > On Wed, 20 Jun 2018, Feng Tang wrote: > > > > On Wed, Jun 20, 2018 at 01:52:10AM +0200, Thomas Gleixner wrote: > > > > > > > > > > static DEFINE_STATIC_KEY_FALSE(__use_tsc); > > > > > +static DEFINE_STATIC_KEY_TRUE(tsc_early_enabled); > > > > > > > > One potential problem may be the several static_keys used here, > > > > the "__use_tsc", the "__sched_clock_stable", it may not be used > > > > very early in boot phase. As the the static_branch_enable() will > > > > use pageing related code while the paging is not setup ready yet. > > > > > > I know how static keys work and thats the reason for having the extra > > > conditional. The key is disabled at a point where paging is available. > > > > Maybe I'm wrong, for printk timestamp, it uses the local_clock() thus > > sched_clock_cpu() > > sched_clock_stable > > check the static_key "__sched_clock_stable" which is > > defined FALSE, and need a static_branch_enable() to > > take effect > > And that has nothing to do with this particular patch. Please read the rest > of the series, especially > > https://lkml.kernel.org/r/20180615174204.30581-5-pasha.tatashin@oracle.com Had not read that patch, thanks for the pointing. No problem now :) - Feng