From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753977AbdGSO2K (ORCPT ); Wed, 19 Jul 2017 10:28:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49246 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751448AbdGSO2I (ORCPT ); Wed, 19 Jul 2017 10:28:08 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8CA8C85A07 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=prarit@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8CA8C85A07 Subject: Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) To: Thomas Gleixner References: <20170718211930.123077-1-salyzyn@android.com> <8afb372a-3951-6fb9-c0be-82756623061f@android.com> <5016ccc4-7faa-b61e-c0a1-b851620849c7@android.com> Cc: Mark Salyzyn , LKML , rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, linux-pm@vger.kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-rtc@vger.kernel.org, andy.shevchenko@gmail.com, Mark Salyzyn , "Paul E. McKenney" , Thierry Strudel , John Stultz , Richard Cochran , Nicolas Pitre , Kees Cook , Ingo Molnar , Peter Zijlstra From: Prarit Bhargava Message-ID: Date: Wed, 19 Jul 2017 10:28:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 19 Jul 2017 14:28:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/19/2017 08:28 AM, Thomas Gleixner wrote: > On Wed, 19 Jul 2017, Prarit Bhargava wrote: >> On 07/19/2017 03:23 AM, Thomas Gleixner wrote: >>> There is another option to remedy this and the dmesg tooling issues: >>> >>> Instead of switching the time stamps in dmesg to a different clock we might >>> as well have an optional secondary timestamp. So instead of: >>> >>> [ 341.590930] wlan0: associated >>> >>> you would get: >>> >>> [ 341.590930] [ sec.usec] wlan0: associated >>> >>> where the second time stamp would be CLOCK_REALTIME/BOOTTIME. >>> >>> That should also solve Prarits problem, hmm? >> >> It would but I would prefer a single time stamp be printed than two. I think >> two timestamps is adding confusion to the output from a end-users point of view. > > Fair enough. I came up with that idea when I looked at the old thread. The > discussion about tools (e.g. dmesg) dried out at some point and looked > unresolved. tglx, There were two outstanding issues with my patchset. The first, as you mention above, is the issue with tooling. I will handle the chicken-and-egg issue with the kernel modification and tooling. I will post patches for dmesg & systemd once the kernel patchset lands in a "next" tree; other tools will have to be patched as we find them. The second issue is a sysfs stability and output issue that I have a question on. Since I'm changing the value of print.time from a bool to an int, the output of /sys/modules/printk/parameters/time would change from Y/N to 0-3. The file is not listed in Documentation/ABI/stable so I think I can change it. Can you confirm that this is the case? I wary of changing anything under sysfs and I'm not sure who else would know if I can change the output of that file. If it is the case that the output can be changed, then I'm going to suggest that we allow, for example, human-readable format "printk.time=monotonic" along with "printk.time=2" as kernel parameters. I would also like your thoughts on that idea. If the file cannot be changed I will have to add an additional module parameter to printk. Does "timestamp" sound okay to you? I will go with whatever you suggest. Thanks, P.