From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753015AbdKWNgZ (ORCPT ); Thu, 23 Nov 2017 08:36:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:35591 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410AbdKWNgY (ORCPT ); Thu, 23 Nov 2017 08:36:24 -0500 Date: Thu, 23 Nov 2017 14:36:20 +0100 From: Petr Mladek To: Linus Torvalds , Thomas Gleixner Cc: LKML , Prarit Bhargava , Mark Salyzyn , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , Sergey Senozhatsky , Steven Rostedt , Joe Perches Subject: Re: [RFC patch 6/7] printk: Store mono/boot/real time timestamps Message-ID: <20171123133620.rck6dlchuujp4aut@pathway.suse.cz> References: <20171115181531.322572387@linutronix.de> <20171115182657.623038265@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171115182657.623038265@linutronix.de> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2017-11-15 19:15:37, Thomas Gleixner wrote: > To allow reliable timestamp correlation, replace the clock MONOTONIC based > timestamp in the printk ringbuffer entries with a collection of MONOTONIC, > BOOTTIME and REALTIME timestamps. > > This does not change the textual output, as this is a separate issue. For > tools which access a vmcore the new timestamp fields are separately > exported by name so the tools do not have to gain knowledge about struct > system_timestamps. The existing 'ts_nsec' timestamp, which is used by > existing tools is mapped to the clock MONOTONIC entry of the timestamp > collection. OK, we do this to do not break existing users. But what are the acceptable ways to make this information available? IMHO, the right solution is that every reader would need to explicitely ask for the extended format: + /dev/kmsg: ask for extended output via ioctl() + syslog: ask for extra timestamps by LOG_*_TIMESTAMP options of the openlog() syscall. It would be similar to LOG_PID. + console: extend to console= parameter format, e.g. console=name[,options][/t] , where /t would cause showing all the timestamps in the following format [xxxxx.xxxxxx][b=xxxxx.xxxxxx][r=xxxxx.xxxxxxx] Would this be acceptable, please? Do you have other/better ideas, please? Best Regards, Petr