Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp204278pxk; Thu, 24 Sep 2020 03:39:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrmHy5hWcYHzADTvI3/y1VMqkPSSs5nu833c1vc3MTfa9i6wEnCr/u05QTyYHKMZGe7ryg X-Received: by 2002:aa7:c256:: with SMTP id y22mr321234edo.16.1600943959386; Thu, 24 Sep 2020 03:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600943959; cv=none; d=google.com; s=arc-20160816; b=JBIQ/tWMFd2SKoitmJAJ4ZYHR9qlqhFS4ri3fZLt8hlzHMgBYy8lFI0XlpqS2YRPX8 0wjnswa58AhoXuK+UMztQtpjSnxhrYe4RcG2sr0vAW7mamJLYK6PnLzz3Y4jBBzxqwBk D2dp/7uJ+5lPKehwOd0q6+hiUmmhV+dDEDTB+o5ammzedQH9h+xfGxoJT13JgNz1b6pz 2BrM287PK7i4CGp1H/t0mfbZE6F7p14mewfJF8z1WL1AuQAglsx++1eW5GRARHz7pQE+ 3KeQeUOCz8AFXHq9JG63DNL3VzEFHZTSyfUufGfcbdqxVk+BDMunPbhruTewVFXvU3nx cAlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OvK7t9Loa7SNSd60wI7vWX6CBAYZcCl23YU7tpkB1ho=; b=tDuE61o8Aww5ojOMtVkKLnZqqmvAlmQe9ZQxBr82/6zpyxk+PpMyrnjAyUlx1TEknU 6U5hXbNCGOs9Xi/lzNnFkBkR5wzAIL8QTBkCTVx6QqhA8fMQHNUvVDEQ1/KhAyKXqWcM WWSlmloMNKUYuEzMmOOGRQCWXHZNItScuixzjKyquWLgUT8agwXE84hZJaL554b1Q+Xw 9DrcrKTbZ4kvMlcxjphl/mi69+65aEZdPHZ1F3dpWyI3ZHEMSHEVhcJmnANnTVJ0JhkB VMEKvRtR15S5azOvy7oZLop+OQGXeH09DONbpnoUAFoOadZXdYQ6+VBJHdw2fm/Ljprm YQBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=iMyHKi8R; 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=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn22si2215532edb.516.2020.09.24.03.38.55; Thu, 24 Sep 2020 03:39:19 -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=@suse.com header.s=susede1 header.b=iMyHKi8R; 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=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbgIXKha (ORCPT + 99 others); Thu, 24 Sep 2020 06:37:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:43480 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbgIXKh3 (ORCPT ); Thu, 24 Sep 2020 06:37:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600943847; 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=OvK7t9Loa7SNSd60wI7vWX6CBAYZcCl23YU7tpkB1ho=; b=iMyHKi8RgrsVu9diQmSB2XaPM5ssIH2ncGBdfVB5wZdjpXpk6orNWQDHqrT1Kc1urbGPNN 1TVnhgYnBtiDuCvjiUEVoHF475+C84DhtT6q8FUPoulteNRdzr2ZlrfytRQhyDy7FZLIMm ZmoaH2aPJNEVB6mFcoB2jKr94UkKgy0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 87D57AC7D; Thu, 24 Sep 2020 10:38:05 +0000 (UTC) Date: Thu, 24 Sep 2020 12:37:26 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Thomas Gleixner , Prarit Bhargava , Mark Salyzyn , Chunyan Zhang , Orson Zhai , Changki Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] printk: Store all three timestamps Message-ID: <20200924103726.GM6442@alley> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-2-pmladek@suse.com> <878sd0m4c3.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878sd0m4c3.fsf@jogness.linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-09-24 02:06:12, John Ogness wrote: > 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. I would like to have a structure if we have more timestamps. Honestly, printk-specific structure sounds like an overhead to me. How big is the chance that struct ktime_timestamps ts would get modified? It has been created for printk after all. That said, I could live with printk-specific structure. We might even need it if we need to store also local_clock(). Best Regards, Petr