Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1692208imm; Thu, 14 Jun 2018 02:10:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLzZs0Gl5yQ3MnntLl6sVzctDM3+IPXNqbWHH5BuMvJRcs6lubXYbzWrebNwyexSYIkJsJ2 X-Received: by 2002:aa7:8004:: with SMTP id j4-v6mr8558936pfi.174.1528967425788; Thu, 14 Jun 2018 02:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528967425; cv=none; d=google.com; s=arc-20160816; b=SbaU4tyBv4NT3ejZ7cyE1OjgzlFDybciOMunZUFhTpfI3pDWMoSp4e19uDbrJcctcl tN+1WowDvDc5YShQoo9gaGv16khTnSo61Lnpc+kzN2sYX7HXGEWHceY0AuqVgrSFv4jJ c3IstAOtOLtnFo2rdqwKoAx4hiakB/0Hc1O91yKswwLI/Wua01VlkCSWtkl+KoZrNKQ3 sfsHoUvQT/UZdYwm4mb+TFOqq99VfUrL8PuiMxXBh5GZFrVoY75248J+wnioE81TeDhV xraIprw5le2FfHWnx37KZtzRQ8BI5+Vyq4FE6FR6M8fwQh5HdsM6XFLMnIyQch4mAAoL RZyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=uAWxbmqeWz0J/EIlLXRIIYwsbi+GkdlYQYE4FyUpaPQ=; b=SEVXf6WNocuIs2T8PmHYcLbvTczktW2fvsSyD3Q09v6CWdnyZxBa+EeivuFlZm3ZX3 6reQxfwzdDXv+Y3ttYEYzHoB1yFn+LgslbVE4wds4yY/Hcr6laUSn7zdi26plWiiW4pk HKsbDCRGhAsyP1CzCd/Xro1NQ74TK8O15ytrGPVcEX90OsSkB7P3rU/l4VnH4IeCyE5b k2UDS0ESNecVadFxE8J8leZyf5MSP6UUCPVKOGVt0FvavLrhs9kEEQ+/ZMhZCX6GTQqM NXkXgA5aLLHqM91gtNNzhUmLJcY77J0GTqe3N/1+eCJiGXUaG7hHK2loPeEJ+bCK7hn6 qFUA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6-v6si4051699pgs.615.2018.06.14.02.10.11; Thu, 14 Jun 2018 02:10:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754833AbeFNJIb (ORCPT + 99 others); Thu, 14 Jun 2018 05:08:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46963 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754571AbeFNJI3 (ORCPT ); Thu, 14 Jun 2018 05:08:29 -0400 Received: from p4fea5fc6.dip0.t-ipconnect.de ([79.234.95.198] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fTOEe-0007rE-NV; Thu, 14 Jun 2018 11:08:05 +0200 Date: Thu, 14 Jun 2018 11:08:04 +0200 (CEST) From: Thomas Gleixner To: Feng Tang cc: Petr Mladek , Ingo Molnar , "H . Peter Anvin" , Alan Cox , Peter Zijlstra , linux-kernel@vger.kernel.org, alek.du@intel.com Subject: Re: [RFC 1/2] printk: Enable platform to provide a early boot clock In-Reply-To: <20180614083851.m6euwwl3xkdtjakd@shbuild888> Message-ID: References: <1527672059-6225-1-git-send-email-feng.tang@intel.com> <20180614083851.m6euwwl3xkdtjakd@shbuild888> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Jun 2018, Feng Tang wrote: > On Wed, May 30, 2018 at 05:20:58PM +0800, Feng Tang wrote: > > Currently printk timestamp mostly come from the sched_clock which > > depends on the clock setup, so there are many kernel logs started > > with "[ 0.000000] " before the clock is calibrated. > > > > This patch will provide an debug option for specific platform to > > provide a early boot time clock, so that we can have time info in > > kernel log much earlier, which can show the time info for the early > > kernel boot, and make boottime tuning/optimization easier (boot time > > is critical for phone/tablet and embedded devices). > > > > Capable platform only need to setup the "boot_printk_clock_fn" > > which could return time in nano seconds. > > > > Together with a TSC patch on x86 system, we have easily captured > > some early boottime killer like unwind_init() which takes about > > 300ms in boot phase. > > Hi Petr and all, > > As the 2/2 tsc related patch is still under review/discussion, can > we consider taking this first? As this may benefit other archs. > For example, Intel Curie platform has an always-on 32KHz osc clock, > which is accurate but low frequency, and it could be used as > early printk timestamp until the high-resolution timer is initialized > and used as sched_clock. Don't know if ARM or other platforms > have similar use case. Can we please _NOT_ add half sorted core stuff in a hurry? Thanks, tglx