Re: [GIT pull] printk updates for 4.15

From: Joe Perches
Date: Tue Nov 14 2017 - 18:00:20 EST


On Tue, 2017-11-14 at 23:50 +0100, Thomas Gleixner wrote:
> Something like the untested patch below should do the storage and converts
> the primary timestamp from local_clock() to clock monotonic.

trivia:

> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -352,7 +352,11 @@ enum log_flags {
> };
>
> struct printk_log {
> - u64 ts_nsec; /* timestamp in nanoseconds */
> + /* Timestamps in nanoseconds */
> + union {
> + u64 ts_nsec;
> + struct timestamps ts;

struct timestamps could probably use a better name

> --- a/include/linux/timekeeping.h
> +++ b/include/linux/timekeeping.h
> @@ -146,7 +146,19 @@ extern void timekeeping_inject_sleeptime
> * PPS accessor
> */
> extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw,
> - struct timespec64 *ts_real);
> + struct timespec64 *ts_real);
> +
> +/*
> + * struct timestanps - Simultaneous mono/boot/real timestamps

typo timestamps

> + * @mono: Monotonic timestamp
> + * @boot: Boottime timestamp
> + * @real: Realtime timestamp
> + */
> +struct timestamps {
> + u64 mono;
> + u64 boot;
> + u64 real;
> +};

Maybe something like struct system_event_timestamps ?