Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp796751pxk; Wed, 23 Sep 2020 17:02:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4YpvCJ25843x8KyCl1LqVtN43XYntkgYk1YCi4BDDe5OyczpiTEPprqq0r3VASOl0e2IT X-Received: by 2002:a17:906:3748:: with SMTP id e8mr2051571ejc.71.1600905724922; Wed, 23 Sep 2020 17:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600905724; cv=none; d=google.com; s=arc-20160816; b=yjgXsNmgwgek0V4fxJx1Z51xfCsDd0VzdslF7DRYlGS+Apj59HjHKSH7H0GVUXj3Tv 8Zo3YszWBPJhQ1wc8UyAG8dKtFBYcCNtMT8ZsuMPaTXtCFvJFJ9xEBvT5QxToY+NFRAr rOciHtGbDMaFlLqgwlNUE84EV4WaT4KTk7y6JLqcO2XAqjoAO0u1pJjU4UzKDjJjBI0d c5RA7jwegS71C20vvaCSTTtiX+HFKlYVos+3TyljoI4HXjQBdiilF5nYf/i4lkOq0pEA plr9FZr2AAg7zDUIQt0BPihoeiq6U3AbGVEwiwhg0HPoSQKFoF32ZEQZNms+kKEE91zd VfHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=vIokpfgOjjX2X94R8YgU9FBZEr1sCciKtz6BI9Dgjr4=; b=m0Zav1wrhFf611IW4fO569DuMgJdd3kd5MMyEhoVqOvyo8oHsUtQyNd4kEvI6Bq3ao tJwQlI8ZS6uCmsYpDpeeTixc7eokbE3e/2k7gp4G/v272+jWEHNLUNYtEFo+X/KANINB qTTu8zVlLNbZfy6Fwwe6NoenDPRrqzfv7bVuq9PxIM5VjcnYfQW4s+PbB/gv2zXTjNjS 6RXxNY82LCOdWybubBfCLD5MHA2GfozJyfG9AWetIVuZPgYvD0l4/j7HOUN7QhLuh/dy NrkB9ji73SpDshyxrQXo/OoTcAji+GQIukcQh/aEHh5QNfcla2Z0chqStQA5XHVwKqGf 1Q6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NuBed+Cb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si977075eds.157.2020.09.23.17.01.41; Wed, 23 Sep 2020 17:02:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NuBed+Cb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbgIXAAP (ORCPT + 99 others); Wed, 23 Sep 2020 20:00:15 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41578 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbgIXAAP (ORCPT ); Wed, 23 Sep 2020 20:00:15 -0400 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1600905613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vIokpfgOjjX2X94R8YgU9FBZEr1sCciKtz6BI9Dgjr4=; b=NuBed+CbyPTz6q6GkbY+oo0HurFi64GYR3KAtvuNulbCDm4ymNlJORDPxiRRrerqpDF2pn pr4xdGvfruwgiA6SCWTxCwe3DQ5de/zEeMwOW8WI6EHZDsFEcYl8r66MQkKb+o2fve68iZ YaDlEiQgevwI8X7b++T7MyAx+/XPiD0tGHNbiZo4jmyS3EYwH4aANo5/yuJkdARQfhDXo8 Gn9pKndifKWa0kKEMAdb+sZv1KO+TR3OmGFmGSTnSL+UalV17O4AUIMMpl7jjufVyxAXJV yhemvIvo0IhOFcmClevGSmY01yDkSgzDOJaHGXbmgD2SLSqZAMcITRVNmjMDjg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1600905613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vIokpfgOjjX2X94R8YgU9FBZEr1sCciKtz6BI9Dgjr4=; b=41KO66NtD7BI13oS/ON6Z+pyQiFW41ScEgrFPva5Reb+E3Ny4P1Ze/VDV6N95eIR98qQB4 UjPQepo1Ue/1SEBA== To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt Cc: Linus Torvalds , Thomas Gleixner , Prarit Bhargava , Mark Salyzyn , Chunyan Zhang , Orson Zhai , Changki Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Petr Mladek Subject: Re: [PATCH 1/2] printk: Store all three timestamps In-Reply-To: <20200923135617.27149-2-pmladek@suse.com> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-2-pmladek@suse.com> Date: Thu, 24 Sep 2020 02:06:12 +0206 Message-ID: <878sd0m4c3.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-23, Petr Mladek wrote: > diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h > index 0adaa685d1ca..09082c8472d3 100644 > --- a/kernel/printk/printk_ringbuffer.h > +++ b/kernel/printk/printk_ringbuffer.h > @@ -14,7 +15,7 @@ > */ > struct printk_info { > u64 seq; /* sequence number */ > - u64 ts_nsec; /* timestamp in nanoseconds */ > + struct ktime_timestamps ts; /* timestamps */ Until now struct printk_info has contained generic types. If we add struct ktime_timestamps, we may start storing more than we need. For example, if more (possibly internal) fields are added to struct ktime_timestamps that printk doesn't care about. We may prefer to generically and explicitly store the information we care about: u64 ts_mono; u64 ts_boot; u64 ts_real; Or create our own struct printk_ts to copy the fields of interest to. John Ogness