Skip to contentSkip to conversation

printk: Add new timestamps

PATCH Superseded Prarit Bhargava 4 participants 9 messages Aug 28, 2017 – Sep 26, 2017

Subsystems (4)

v10 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

v10 cover printk: Add new timestamps

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.

Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp.

Cc Mark Salyzyn <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc John Stultz <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "Paul E. McKenney" <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc Deepa Dinamani <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Joel Fernandes <[email protected]>
Cc Prarit Bhargava <[email protected]>
Cc Kees Cook <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc "Luis R. Rodriguez" <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc "Jason A. Donenfeld" <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Josh Poimboeuf <[email protected]>
[jstultz: reworked Kconfig settings to avoid defconfig noise]

Prarit Bhargava (2):
time: Make fast functions return 0 before timekeeping is initialized
printk: Add monotonic, boottime, and realtime timestamps

 Documentation/admin-guide/kernel-parameters.txt |   6 +-
 include/linux/timekeeping.h                     |   1 +
 kernel/printk/printk.c                          | 116 +++++++++++++++++++++++-
 kernel/time/timekeeping.c                       |  54 ++++++++---
 lib/Kconfig.debug                               |  48 +++++++++-
 5 files changed, 206 insertions(+), 19 deletions(-)
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH v10 1/2 time: Make fast functions return 0 before timekeeping is initialized

printk timestamps will be extended to include mono and boot time by using the fast timekeeping functions ktime_get_mono|boot_fast_ns() functions. The functions can return garbage before timekeeping is initialized resulting in garbage timestamps.

The fast time functions must return 0 before timekeeping is initialized.

---
 kernel/time/timekeeping.c | 47 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 33 insertions(+), 14 deletions(-)
kernel/time/timekeeping.c +33 -14
index cedafa008de5..d111039e0245 100644
@@ -60,8 +60,39 @@ struct tk_fast {
 	struct tk_read_base	base[2];
 };
 
-static struct tk_fast tk_fast_mono ____cacheline_aligned;
-static struct tk_fast tk_fast_raw  ____cacheline_aligned;
+/* Suspend-time cycles value for halted fast timekeeper. */
+static u64 cycles_at_suspend;
+
+static u64 dummy_clock_read(struct clocksource *cs)
+{
+	return cycles_at_suspend;
+}
+
+static struct clocksource dummy_clock = {
+	.read = dummy_clock_read,
+};
+
+static struct tk_fast tk_fast_mono ____cacheline_aligned = {
+	.base = {
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+	},
+};
+
+static struct tk_fast tk_fast_raw  ____cacheline_aligned = {
+	.base = {
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+	},
+};
 
 /* flag for if timekeeping is suspended */
 int __read_mostly timekeeping_suspended;
@@ -477,18 +508,6 @@ u64 notrace ktime_get_boot_fast_ns(void)
 }
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
 
-/* Suspend-time cycles value for halted fast timekeeper. */
-static u64 cycles_at_suspend;
-
-static u64 dummy_clock_read(struct clocksource *cs)
-{
-	return cycles_at_suspend;
-}
-
-static struct clocksource dummy_clock = {
-	.read = dummy_clock_read,
-};
-
 /**
  * halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource.
  * @tk: Timekeeper to snapshot.
Signature · 1 line
1.8.5.5
#2 lore raw

Re: [PATCH 1/2 v10] time: Make fast functions return 0 before timekeeping is initialized

kernel/time/timekeeping.c struct tk_fast { · line 84

Quoted 10 lines · Prarit Bhargava
kernel/time/timekeeping.c +10 -0
+static struct tk_fast tk_fast_mono ____cacheline_aligned = {
+	.base = {
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+		(struct tk_read_base){
+			.clock = &dummy_clock,
+		},
+	},
+};

I think I complained about this ugly typecast before.

.base[0] = { .clock = &dummy_clock, },

       	.base[1] = { .clock = &dummy_clock, },

Hmm?

Thanks,

tglx

#3 lore raw

[tip:core/printk] timekeeping: Make fast accessors return 0 before timekeeping is initialized

In reply to Prarit Bhargava
timekeeping: Make fast accessors return 0 before timekeeping is initialized
Commit-ID:  5df32107f609c1f621bcdac0a685c23677ef671e
Gitweb:     http://git.kernel.org/tip/5df32107f609c1f621bcdac0a685c23677ef671e
Author:     Prarit Bhargava <[email protected]>
AuthorDate: Mon, 28 Aug 2017 08:21:53 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 25 Sep 2017 21:05:59 +0200

timekeeping: Make fast accessors return 0 before timekeeping is initialized

printk timestamps will be extended to include mono and boot time by using the fast timekeeping accessors ktime_get_mono|boot_fast_ns(). The functions can return garbage before timekeeping is initialized resulting in garbage timestamps.

Initialize the fast timekeepers with dummy clocks which guarantee a 0 readout up to timekeeping_init().

---
 kernel/time/timekeeping.c | 35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)
kernel/time/timekeeping.c +21 -14
index 2cafb49..6a92794 100644
@@ -60,8 +60,27 @@ struct tk_fast {
 	struct tk_read_base	base[2];
 };
 
-static struct tk_fast tk_fast_mono ____cacheline_aligned;
-static struct tk_fast tk_fast_raw  ____cacheline_aligned;
+/* Suspend-time cycles value for halted fast timekeeper. */
+static u64 cycles_at_suspend;
+
+static u64 dummy_clock_read(struct clocksource *cs)
+{
+	return cycles_at_suspend;
+}
+
+static struct clocksource dummy_clock = {
+	.read = dummy_clock_read,
+};
+
+static struct tk_fast tk_fast_mono ____cacheline_aligned = {
+	.base[0] = { .clock = &dummy_clock, },
+	.base[1] = { .clock = &dummy_clock, },
+};
+
+static struct tk_fast tk_fast_raw  ____cacheline_aligned = {
+	.base[0] = { .clock = &dummy_clock, },
+	.base[1] = { .clock = &dummy_clock, },
+};
 
 /* flag for if timekeeping is suspended */
 int __read_mostly timekeeping_suspended;
@@ -477,18 +496,6 @@ u64 notrace ktime_get_boot_fast_ns(void)
 }
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
 
-/* Suspend-time cycles value for halted fast timekeeper. */
-static u64 cycles_at_suspend;
-
-static u64 dummy_clock_read(struct clocksource *cs)
-{
-	return cycles_at_suspend;
-}
-
-static struct clocksource dummy_clock = {
-	.read = dummy_clock_read,
-};
-
 /**
  * halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource.
  * @tk: Timekeeper to snapshot.
#4 lore raw

PATCH v10 2/2 printk: Add monotonic, boottime, and realtime timestamps

In reply to 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.

Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time is read without the protection of a sequence lock when printk_get_ts() is set to __ktime_get_real_fast_ns_unsafe().

v2: Use peterz's suggested Kconfig options. Merge patchset together. Fix i386 !CONFIG_PRINTK builds.

v3: Fixed x86_64_defconfig. Added printk_time_type enum and printk_time_str for better output. Added BOOTTIME clock functionality.

v4: Fix messages, add additional printk.time options, and fix configs.

v5: Renaming of structures, and allow printk_time_set() to evaluate substrings of entries (eg: allow 'r', 'real', 'realtime'). From peterz, make fast functions return 0 until timekeeping is initialized (removes timekeeping_active & ktime_get_boot|real_log_ts() suggested by
tglx and adds ktime_get_real_offset()). Switch to a function pointer
for printk_get_ts() and reference fast functions. Make timestamp_sources enum match choice options for CONFIG_PRINTK_TIME (adds PRINTK_TIME_UNDEFINED).

v6: Define PRINTK_TIME_UNDEFINED for !CONFIG_PRINTK builds. Separate timekeeping changes into separate patch. Minor include file cleanup.

v7: Add default case to printk_set_timestamp() and add PRINTK_TIME_DEBUG for users that want to set timestamp to different values during runtime. Add jstultz' Kconfig to avoid defconfig churn.

v8: Add CONFIG_PRINTK_TIME_DEBUG to allow timestamp runtime switching. Rename PRINTK_TIME_DISABLE to PRINTK_TIME_DISABLED. Rename printk_set_timestamp() to printk_set_ts_func(). Separate printk_set_ts_func() and printk_get_first_ts() portions. Rename param functions. Adjust configs, enum, and timestamp_sources_str to be 0-4. Add mention realtime clock is UTC in Documentation.

v9: Fix typo. Add __ktime_get_real_fast_ns_unsafe().

v10: Remove time parameter restrictions.

Cc Mark Salyzyn <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc John Stultz <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "Paul E. McKenney" <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc Deepa Dinamani <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Joel Fernandes <[email protected]>
Cc Prarit Bhargava <[email protected]>
Cc Kees Cook <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc "Luis R. Rodriguez" <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc "Jason A. Donenfeld" <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Josh Poimboeuf <[email protected]>
[jstultz: reworked Kconfig settings to avoid defconfig noise]
---
 Documentation/admin-guide/kernel-parameters.txt |   6 +-
 include/linux/timekeeping.h                     |   1 +
 kernel/printk/printk.c                          | 116 +++++++++++++++++++++++-
 kernel/time/timekeeping.c                       |  13 +++
 lib/Kconfig.debug                               |  48 +++++++++-
 5 files changed, 176 insertions(+), 8 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +4 -2
index d9c171ce4190..8d6b194533af 100644
@@ -3188,8 +3188,10 @@
 			ratelimit - ratelimit the logging
 			Default: ratelimit
 
-	printk.time=	Show timing data prefixed to each printk message line
-			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
+	printk.time=	Show timestamp prefixed to each printk message line
+			Format: <string>
+				(0/N/n/disable, 1/Y/y/local,
+				 b/boot, m/monotonic, r/realtime (in UTC))
 
 	processor.max_cstate=	[HW,ACPI]
 			Limit processor to maximum C-state
include/linux/timekeeping.h +1 -0
index ddc229ff6d1e..7ef0b0da0e74 100644
@@ -239,6 +239,7 @@ static inline u64 ktime_get_raw_ns(void)
 extern u64 ktime_get_mono_fast_ns(void);
 extern u64 ktime_get_raw_fast_ns(void);
 extern u64 ktime_get_boot_fast_ns(void);
+extern u64 __ktime_get_real_fast_ns_unsafe(void);
 
 /*
  * Timespec interfaces utilizing the ktime based ones
kernel/printk/printk.c +111 -5

151 lines not on this page · raw message

kernel/time/timekeeping.c +13 -0
index d111039e0245..9463606951b1 100644
@@ -509,6 +509,19 @@ u64 notrace ktime_get_boot_fast_ns(void)
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
 
 /**
+ * __ktime_get_real_fast_ns_unsafe: - Return an unsafe realtime value
+ * On 32-bit systems may lead to unlikely situations where the result is wrong
+ * because the real time offset is read without the protection of a sequence
+ * lock.
+ */
+u64 __ktime_get_real_fast_ns_unsafe(void)
+{
+	struct timekeeper *tk = &tk_core.timekeeper;
+
+	return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_real));
+}
+
+/**
  * halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource.
  * @tk: Timekeeper to snapshot.
  *
lib/Kconfig.debug +47 -1

59 lines not on this page · raw message

Signature · 1 line
1.8.5.5
#5 lore raw

Re: [PATCH 2/2 v10] printk: Add monotonic, boottime, and realtime timestamps

kernel/time/timekeeping.c u64 notrace ktime_get_boot_fast_ns(void) · line 509

Quoted 6 lines · Prarit Bhargava
kernel/time/timekeeping.c +0 -0
index d111039e0245..9463606951b1 100644
@@ -509,6 +509,19 @@ u64 notrace ktime_get_boot_fast_ns(void)
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);

Why is this still in the middle of the printk hodgepodge?

kernel/time/timekeeping.c u64 notrace ktime_get_boot_fast_ns(void) · line 521

Quoted 12 lines
kernel/time/timekeeping.c +11 -0
 /**
+ * __ktime_get_real_fast_ns_unsafe: - Return an unsafe realtime value
+ * On 32-bit systems may lead to unlikely situations where the result is wrong
+ * because the real time offset is read without the protection of a sequence
+ * lock.
+ */
+u64 __ktime_get_real_fast_ns_unsafe(void)
+{
+	struct timekeeper *tk = &tk_core.timekeeper;
+
+	return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_real));
+}

And no, this function is just horrible, both in name and implementation. This can be done without that unprotected and racy access to the realtime offset. Patch below.

Thanks,

tglx

8<-------------------
Subject: timekeeping: Provide NMI safe access to clock realtime
From: Thomas Gleixner <[email protected]>
Date: Thu, 31 Aug 2017 17:12:48 +0200

The configurable printk timestamping wants access to clock realtime. Right now there is no ktime_get_real_fast_ns() accessor because reading the monotonic base and the realtime offset cannot be done atomically. Contrary to boot time this offset can change during runtime and cause half updated readouts.

struct tk_read_base was fully packed when the fast timekeeper access was implemented. commit ceea5e3771ed ("time: Fix clock->read(clock) race around clocksource changes") removed the 'read' function pointer from the structure, but of course left the comment stale.

So now the structure can fit a new 64bit member w/o violating the cache line constraints.

Add real_base to tk_read_base and update it in the fast timekeeper update sequence.

Implement an accessor which follows the same scheme as the accessor to clock monotonic, but uses the new real_base to access clock real time.

The runtime overhead for updating real_base is minimal as it just adds two cache hot values and stores into the same an already dirtied cache line.

---
 include/linux/timekeeper_internal.h |    6 +++++-
 include/linux/timekeeping.h         |    1 +
 kernel/time/timekeeping.c           |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)
include/linux/timekeeper_internal.h +5 -1
@@ -13,19 +13,22 @@
 /**
  * struct tk_read_base - base structure for timekeeping readout
  * @clock:	Current clocksource used for timekeeping.
- * @read:	Read function of @clock
  * @mask:	Bitmask for two's complement subtraction of non 64bit clocks
  * @cycle_last: @clock cycle value at last update
  * @mult:	(NTP adjusted) multiplier for scaled math conversion
  * @shift:	Shift value for scaled math conversion
  * @xtime_nsec: Shifted (fractional) nano seconds offset for readout
  * @base:	ktime_t (nanoseconds) base time for readout
+ * @base_real:	Nanoseconds base value for clock REALTIME readout
  *
  * This struct has size 56 byte on 64 bit. Together with a seqcount it
  * occupies a single 64byte cache line.
  *
  * The struct is separate from struct timekeeper as it is also used
  * for a fast NMI safe accessors.
+ *
+ * @base_real is for the fast NMI safe accessor to allow reading clock
+ * realtime from any context.
  */
 struct tk_read_base {
 	struct clocksource	*clock;
@@ -35,6 +38,7 @@ struct tk_read_base {
 	u32			shift;
 	u64			xtime_nsec;
 	ktime_t			base;
+	u64			base_real;
 };
 
 /**
include/linux/timekeeping.h +1 -0
@@ -239,6 +239,7 @@ static inline u64 ktime_get_raw_ns(void)
 extern u64 ktime_get_mono_fast_ns(void);
 extern u64 ktime_get_raw_fast_ns(void);
 extern u64 ktime_get_boot_fast_ns(void);
+extern u64 ktime_get_real_fast_ns(void);
 
 /*
  * Timespec interfaces utilizing the ktime based ones
kernel/time/timekeeping.c +35 -0
@@ -496,6 +496,39 @@ u64 notrace ktime_get_boot_fast_ns(void)
 }
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
 
+
+/*
+ * See comment for __ktime_get_fast_ns() vs. timestamp ordering
+ */
+static __always_inline u64 __ktime_get_real_fast_ns(struct tk_fast *tkf)
+{
+	struct tk_read_base *tkr;
+	unsigned int seq;
+	u64 now;
+
+	do {
+		seq = raw_read_seqcount_latch(&tkf->seq);
+		tkr = tkf->base + (seq & 0x01);
+		now = ktime_to_ns(tkr->base_real);
+
+		now += timekeeping_delta_to_ns(tkr,
+				clocksource_delta(
+					tk_clock_read(tkr),
+					tkr->cycle_last,
+					tkr->mask));
+	} while (read_seqcount_retry(&tkf->seq, seq));
+
+	return now;
+}
+
+/**
+ * ktime_get_real_fast_ns: - NMI safe and fast access to clock realtime.
+ */
+u64 ktime_get_real_fast_ns(void)
+{
+	return __ktime_get_real_fast_ns(&tk_fast_mono);
+}
+
 /**
  * halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource.
  * @tk: Timekeeper to snapshot.
@@ -514,6 +547,7 @@ static void halt_fast_timekeeper(struct
 	memcpy(&tkr_dummy, tkr, sizeof(tkr_dummy));
 	cycles_at_suspend = tk_clock_read(tkr);
 	tkr_dummy.clock = &dummy_clock;
+	tkr_dummy.base_real = tkr->base + tk->offs_real;
 	update_fast_timekeeper(&tkr_dummy, &tk_fast_mono);
 
 	tkr = &tk->tkr_raw;
@@ -663,6 +697,7 @@ static void timekeeping_update(struct ti
 	update_vsyscall(tk);
 	update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET);
 
+	tk->tkr_mono.base_real = tk->tkr_mono.base + tk->offs_real;
 	update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono);
 	update_fast_timekeeper(&tk->tkr_raw,  &tk_fast_raw);
 
#6 lore raw

[tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

In reply to Prarit Bhargava
printk: Add monotonic, boottime, and realtime timestamps
Commit-ID:  a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Gitweb:     http://git.kernel.org/tip/a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Author:     Prarit Bhargava <[email protected]>
AuthorDate: Mon, 28 Aug 2017 08:21:54 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 25 Sep 2017 21:12:06 +0200

printk: Add monotonic, boottime, and realtime timestamps

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.

Make printk output different timestamps by adding options for no timestamp, the local hardware clock, the monotonic clock, the boottime clock, and the clock realtime. The default clock can be selected via:

- Kconfig
- Kernel command line parameter
- Sysfs file

Note, that existing user space tools might be confused by selecting clock realtime, so handle with care.

[ jstultz: Reworked Kconfig settings to avoid defconfig noise ]

Cc John Stultz <[email protected]>
Cc Joel Fernandes <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Deepa Dinamani <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc "Jason A. Donenfeld" <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc "Paul E. McKenney" <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Kees Cook <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Mark Salyzyn <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc "Luis R. Rodriguez" <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Andrew Morton <[email protected]>
---
 Documentation/admin-guide/kernel-parameters.txt |   6 +-
 kernel/printk/printk.c                          | 116 +++++++++++++++++++++++-
 lib/Kconfig.debug                               |  48 +++++++++-
 3 files changed, 162 insertions(+), 8 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +4 -2
index 0549662..9a84483 100644
@@ -3211,8 +3211,10 @@
 			ratelimit - ratelimit the logging
 			Default: ratelimit
 
-	printk.time=	Show timing data prefixed to each printk message line
-			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
+	printk.time=	Show timestamp prefixed to each printk message line
+			Format: <string>
+				(0/N/n/disable, 1/Y/y/local,
+				 b/boot, m/monotonic, r/realtime (in UTC))
 
 	processor.max_cstate=	[HW,ACPI]
 			Limit processor to maximum C-state
kernel/printk/printk.c +111 -5

151 lines not on this page · raw message

lib/Kconfig.debug +47 -1

59 lines not on this page · raw message

#7 lore raw

Re: [tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

Quoted 8 lines · tip-bot for Prarit Bhargava
Commit-ID:  a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Gitweb:     http://git.kernel.org/tip/a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Author:     Prarit Bhargava <[email protected]>
AuthorDate: Mon, 28 Aug 2017 08:21:54 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 25 Sep 2017 21:12:06 +0200

printk: Add monotonic, boottime, and realtime timestamps

this doesn't seem to be the latest version of the patch set.
v12 can be found here: lkml.kernel.org/r/[email protected]

	-ss
#8 lore raw

Re: [tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

Quoted 8 lines · Sergey Senozhatsky
Quoted 7 lines · tip-bot for Prarit Bhargava
Commit-ID:  a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Gitweb:     http://git.kernel.org/tip/a4c1a0002f4518363da9d9ecd7b805af152dcdf1
Author:     Prarit Bhargava <[email protected]>
AuthorDate: Mon, 28 Aug 2017 08:21:54 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 25 Sep 2017 21:12:06 +0200
Quoted 4 lines
Quoted 1 line

printk: Add monotonic, boottime, and realtime timestamps

this doesn't seem to be the latest version of the patch set.
v12 can be found here: lkml.kernel.org/r/[email protected]

Thanks for pointing it out. I somehow got lost in the revisions zoo. Fixed now.

tglx