From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756445AbdKNXAR (ORCPT ); Tue, 14 Nov 2017 18:00:17 -0500 Received: from smtprelay0235.hostedemail.com ([216.40.44.235]:34635 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752332AbdKNXAJ (ORCPT ); Tue, 14 Nov 2017 18:00:09 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:4321:4605:5007:6119:7875:10004:10400:10848:11026:11232:11658:11914:12043:12295:12296:12438:12740:12760:12895:13069:13311:13357:13439:14096:14097:14659:14721:21080:21433:21451:21627:30029:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wound45_3b23560364e54 X-Filterd-Recvd-Size: 2932 Message-ID: <1510700404.2006.34.camel@perches.com> Subject: Re: [GIT pull] printk updates for 4.15 From: Joe Perches To: Thomas Gleixner , Linus Torvalds Cc: Mark Salyzyn , Petr Mladek , LKML , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , Prarit Bhargava , Sergey Senozhatsky , Steven Rostedt Date: Tue, 14 Nov 2017 15:00:04 -0800 In-Reply-To: References: <20171114100336.uil744pxmbsawq63@pathway.suse.cz> <7d23f705-1479-7874-7918-f2af9ec02c86@android.com> <7f0e0165-2b22-f2cf-ce6e-8db3d7325973@android.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-11-14 at 23:50 +0100, Thomas Gleixner wrote: > Something like the untested patch below should do the storage and converts > the primary timestamp from local_clock() to clock monotonic. trivia: > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -352,7 +352,11 @@ enum log_flags { > }; > > struct printk_log { > - u64 ts_nsec; /* timestamp in nanoseconds */ > + /* Timestamps in nanoseconds */ > + union { > + u64 ts_nsec; > + struct timestamps ts; struct timestamps could probably use a better name > --- a/include/linux/timekeeping.h > +++ b/include/linux/timekeeping.h > @@ -146,7 +146,19 @@ extern void timekeeping_inject_sleeptime > * PPS accessor > */ > extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw, > - struct timespec64 *ts_real); > + struct timespec64 *ts_real); > + > +/* > + * struct timestanps - Simultaneous mono/boot/real timestamps typo timestamps > + * @mono: Monotonic timestamp > + * @boot: Boottime timestamp > + * @real: Realtime timestamp > + */ > +struct timestamps { > + u64 mono; > + u64 boot; > + u64 real; > +}; Maybe something like struct system_event_timestamps ?