Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp845301pxk; Wed, 23 Sep 2020 18:49:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw22eg4qcZgAWN1ElAKjD0JftRcCTHq/uUftMg5qKa278efLl0hYYxk2XsiL8KnFqhGEZSJ X-Received: by 2002:a05:6402:164d:: with SMTP id s13mr2200843edx.222.1600912142648; Wed, 23 Sep 2020 18:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600912142; cv=none; d=google.com; s=arc-20160816; b=wTZVUZwogTmSHaWgxSOZGzHbqIKCLBtvgSXOnGpgKoyQZfi3suRAHhnjLmCK/CW9lx Jb3apQk2mTGGLNaHKGc0aWYsIV99vOWl6pHBkLJPmIrTDQnI2Td//s62SRqGI5jmeoKe Z6QVtYhr+F/74fP6iM6mUZg04yCUBsTsdtngYfiLdwmwpdFVf/iMLrgdnNvnCTg7IBu0 enIjJZIdtJpqAF04tIsjc44Tiuki41uQQkkHNclTi1WDrOg8lveKl+2it12TciYVAsND gS1n7oUOAcbBuRXkWTH1zASmtSNLXt7exn1SzNDbg6EEdSZU5sv2XEzn9pg7z1t93H1j 3ftQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cW0nV77srDNY6xtWIN0V3XsJcs6UdJ5qZDcpMrle79A=; b=AvmkDdYkUsB9XYodZ5fSMEB29FrzTG4QEbMm5afXH4pmX2DsIpe4TGe/PX153x7uV1 gG+mg8RqXI/n6VJG4UNRliyLnbal6J6ixUKsAv7a0fne1umy07CkYkIICGvyAFgts+VR QUPk0/YbJ+zsTNOdEbWkMXfaczNLoQ+iFotlqmSwvLv2PDyM4byvvVs2iOFK8rCu+uPt SsRFw/XNomCqcpNyV69zI293lexeV8PePuiTQS3cE16WEqaD3qBaEASGmGbYMtI6tieK /imO62i/FOTRILDPclJvZdpslx3N8E2foUNaATXModw3H93ULOtY2HcKVULMqVtRfHQi hdag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mi69YO6z; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si1084602edb.467.2020.09.23.18.48.37; Wed, 23 Sep 2020 18:49:02 -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=@gmail.com header.s=20161025 header.b=Mi69YO6z; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbgIXBpZ (ORCPT + 99 others); Wed, 23 Sep 2020 21:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726205AbgIXBpZ (ORCPT ); Wed, 23 Sep 2020 21:45:25 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C00D8C0613CE for ; Wed, 23 Sep 2020 18:45:39 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id d19so784121pld.0 for ; Wed, 23 Sep 2020 18:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cW0nV77srDNY6xtWIN0V3XsJcs6UdJ5qZDcpMrle79A=; b=Mi69YO6zEBWhiRjHcG1SvaB6qxt9D4qr+8d/RnY96dhgO/+Ew8u/kf9gAxgalcTYg5 pKtc8twzODrnLK3hyeX1OGPZkKeLRFQ9Fe0VdCO5V7myR31YuIXrJ857s4gcBbgERvUc MD5JHinxE2eAXhD8xy4C1HksJaNpGP03olgr+T6a2JUySqp4cjfVIigrMIyVRHOYxg0R TpEFLCZ3kdJY/APGml0FXQNdcdOeQY+xdAUW4J+wDAPHOk2JmVsm7/gmR1m1GLfVj4uF tcBpsREFYYKvP1xDHO4vNDgwYaTTpG9ww6beLmJIGq+yIQwL6CiQiMsx92GkpphxhPaZ 749A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cW0nV77srDNY6xtWIN0V3XsJcs6UdJ5qZDcpMrle79A=; b=QCPPRkmnKSXxY9MyEZ8sM7LwLecymRC5wwv43pLkesBSAPji9ZfRJfC3Ov6TKfCVb0 u5YJXaIMyR3L7TzsD2w2JL6wmL5F/r/FM9TwFo+b+z06XZhFi4q7hlNcl0Agwa+VniUJ CL+i+NYCCgpddI6JIFtUayYzD7Hw62HYNZ4NNZ1aaay+ddyRHj032jaYnTEiaKqlk2K3 z+RD2CfclZUW0z/MH7sln0M6tpKCzBWUoSJF64bMmlTHBAISfScaxF3d/wB7P3smHzHt 6JEnuBwGmHYyr+VdnQd44N02WRjKIAA/yxSDSiBDvKIUA/Jg7XYT/qQZra6YD6aPa0VW sHHQ== X-Gm-Message-State: AOAM53013rT9iS0EOrXbfSQEzxR1p4AMq0YCtBQMlV14ZuthsVQCcw8L J3Wed2iqJGSQwJu7Ovfir6I= X-Received: by 2002:a17:90a:d90c:: with SMTP id c12mr1836667pjv.94.1600911939176; Wed, 23 Sep 2020 18:45:39 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id a15sm818218pfi.119.2020.09.23.18.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 18:45:38 -0700 (PDT) Date: Thu, 24 Sep 2020 10:45:36 +0900 From: Sergey Senozhatsky To: John Ogness Cc: Petr Mladek , 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: <20200924014536.GC577@jagdpanzerIV.localdomain> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-2-pmladek@suse.com> <87pn6cdtwa.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn6cdtwa.fsf@jogness.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/09/24 00:18), John Ogness wrote: > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > index 1560649cbd35..0ed8901916f4 100644 > > --- a/kernel/printk/printk.c > > +++ b/kernel/printk/printk.c > > @@ -520,10 +522,10 @@ static int log_store(u32 caller_id, int facility, int level, > > r.info->facility = facility; > > r.info->level = level & 7; > > r.info->flags = flags & 0x1f; > > - if (ts_nsec > 0) > > - r.info->ts_nsec = ts_nsec; > > + if (ts) > > + r.info->ts = *ts; > > else > > - r.info->ts_nsec = local_clock(); > > + ktime_get_fast_timestamps(&r.info->ts); > > I am wondering if we still want to keep the local_clock() as well (and > as the default). ftrace also uses it by default, which means traces and > printk logs could be coordinated by default until now. Good point. > If we wanted to keep the local clock, should the local clock be a part > of struct ktime_timestamps? Or should struct printk_info maintain that > separately (either as @ts_nsec or @ts_local or whatever). I like the idea of having a dedicated printk_timestamps structure with the timestamps. -ss