Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1079036ybg; Wed, 29 Jul 2020 05:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoLSCdGLBbhWuB41HYhfkStAwB871Btr9f4ZpPxOcKTeGE+bAvPUmgBoAb6FP1cVZJ81Ao X-Received: by 2002:a50:af45:: with SMTP id g63mr31941196edd.52.1596025401471; Wed, 29 Jul 2020 05:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596025397; cv=none; d=google.com; s=arc-20160816; b=jbY+EdUgtQnaxK4/L9P+rpzQWt99E5zonVB4zeSs/J1K626hRVsTKkHQ5ad6IxEJQo f9qZl3j8Wx5g1UYW3NCtpYwJob4SpIjIVoAOonhR9MnPmyemhkCCcE+Oejh2/MdjECte d4dNYO5WbOqbuH0KzNd9U9e/K0Sy1yiDz+DGB7P1uSB6Co8KtbXuQbvJouanIO94o5po wyMhxNyz7FW3oIOWPXZ8XePLNxuE3S6v9JKz8h2L3tbx2io3V9uf+I8DABZ9ZZ48uSAU CKZ5kznVY7OE2y9Ynpt9hCmrychpFG8l1+aTlLJOI12BfATxzp9YurAeAFsha8yOMAsL Gceg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JpyOWSPe1mDJUCalnib+RdakBtwf9GKVyJoJrNi65D4=; b=vsTuzQm3MIOqinNaOmPC0RksnyuHP6TUInr8JR7nDhK7rRtZ6V3vOx5BocjSlORjSk hHk7qEXcd3Gu/HmHIrq6X7Hr6tn9rD2KbzywjyMy9Rwv2+ugGhiYEfLM27yCqDMNyjpj t2t+c7dfV3x0bWsTn90/Zwpq6IH84EEZ+FGn4xzjhNqCkNu/m1kMFy+m0KaXBmlj3H1I pwNwjFePE8s4CwYB7nyf/Yk6wfXlVH+aOml+9LSflpd7K4zi0CserDlqr86kZJJoZGSN QBUav0ctXcqwTb9OoW7t1JouK2NJXOeBdP2Kwzm9zL4q8nX2mVeelCsG2pWFZb2MA47b AM9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KOyS+Xfn; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si1032083edr.215.2020.07.29.05.22.54; Wed, 29 Jul 2020 05:23:17 -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=@redhat.com header.s=mimecast20190719 header.b=KOyS+Xfn; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726862AbgG2MWr (ORCPT + 99 others); Wed, 29 Jul 2020 08:22:47 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:50813 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbgG2MWq (ORCPT ); Wed, 29 Jul 2020 08:22:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596025365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JpyOWSPe1mDJUCalnib+RdakBtwf9GKVyJoJrNi65D4=; b=KOyS+XfnEEK1E/luJ30XSZnk/y2VrmG3jlrcWCv28Z9zBkWY5tbw/SdWXt9ahCWwQ8ywnk m+kw8KbLg5fPGYzN5ncm9uSg76486smiih4HkhdD2wqThT7ZAyKNjyDQNrnMT7Q5kzzfxS 2cPpwURGxW+IyWbn+Jt6SI0voi1+4vc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-365-JlU9oetmMg6ICSEKurRjXg-1; Wed, 29 Jul 2020 08:22:39 -0400 X-MC-Unique: JlU9oetmMg6ICSEKurRjXg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2CDC81932482; Wed, 29 Jul 2020 12:22:38 +0000 (UTC) Received: from prarit.7a2m.lab.eng.bos.redhat.com (dhcp16-222-232.7a2m.lab.eng.bos.redhat.com [10.16.222.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35F6910098AB; Wed, 29 Jul 2020 12:22:37 +0000 (UTC) From: Prarit Bhargava To: corbet@lwn.net, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com Cc: chunyan.zhang@unisoc.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: Re: [PATCH V13] printk: Add monotonic, boottime, and realtime timestamps Date: Wed, 29 Jul 2020 08:22:36 -0400 Message-Id: <20200729122236.17418-1-prarit@redhat.com> In-Reply-To: <20200729114423.30606-1-zhang.lyra@gmail.com> References: <20200729114423.30606-1-zhang.lyra@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chunyan Zhang wrote: > From: Prarit Bhargava > > printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock > timestamp to printk messages. The local hardware clock loses time each > day making it difficult to determine exactly when an issue has occurred in > the kernel log, and making it difficult to determine how kernel and > hardware issues relate to each other in real time. > > Make printk output different timestamps by adding options for no > timestamp, the local hardware clock, the monotonic clock, the boottime > clock, and the real clock. Allow a user to pick one of the clocks by > using the printk.time kernel parameter. Output the type of clock in > /sys/module/printk/parameters/time so userspace programs can interpret the > timestamp. > > v13: This patch seems have being forgotten for 3 years. Rebase it on > the latest kernel v5.8, reolve conflicts and fix compiling errors. > Change code to adapt new printk_time usage. > Petr's concern on printk_time is addressed by current version of kernel, too. Lyra, Copying a reply I sent to Orson who sent me this patch privately this morning with some additional information. ISTR the reason that this was dropped was because of the a problem with the way systemd read the kernel's timestamps. It got the attention of Linus, and it was then pulled from the tree. I need to go back and review the entire thread as it's been several years since we had the discussion although ISTR someone mentioning that doing two timestamps would not be a problem for systemd. For example, [48551.015086] would be [48551.015086] m[xxxx.xxxx] for the monotonic clock timestamp, and [48551.015086] b[xxxx.xxxx] for the boottime clock, etc. P.