Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314323 > unrolled thread

Re: [PATCH 0/2] printk, Add printk.clock kernel parameter [v2]

Started byPrarit Bhargava <prarit@redhat.com>
First post2016-01-21 17:20 +0100
Last post2016-01-22 09:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 0/2] printk, Add printk.clock kernel parameter [v2] Prarit Bhargava <prarit@redhat.com> - 2016-01-21 17:20 +0100
    Re: [PATCH 0/2] printk, Add printk.clock kernel parameter [v2] Thomas Gleixner <tglx@linutronix.de> - 2016-01-22 09:10 +0100

#1314323 — Re: [PATCH 0/2] printk, Add printk.clock kernel parameter [v2]

FromPrarit Bhargava <prarit@redhat.com>
Date2016-01-21 17:20 +0100
SubjectRe: [PATCH 0/2] printk, Add printk.clock kernel parameter [v2]
Message-ID<qTq7N-7IN-29@gated-at.bofh.it>

On 01/14/2016 09:44 AM, Thomas Gleixner wrote:
> On Thu, 14 Jan 2016, Petr Mladek wrote:
>> On Wed 2016-01-13 18:28:50, Thomas Gleixner wrote:
>>> You can solve the whole business by changing the timestamp in printk_log to
>>>
>>>    u64	    mono;
>>>    u64	    offset_real;
>>
>> This is not so easy because the structure is proceed by userspace tool,
>> e.g. crash, see log_buf_kexec_setup(). We would need to update all
>> the tools as well.
> 
> Fair enough.
>  
>>> and have a function which does:
>>>
>>> u64 ktime_get_log_ts(u64 *offset_real)
>>> {
>>> 	*offset_real = tk_core.timekeeper.offs_real;
>>>
>>> 	if (timekeeping_active)
>>> 		return ktime_get_mono_fast_ns();
>>> 	else
>>> 		return local_clock();
>>> }
>>
>> A solution would be to apply the offset_real immediately. I wonder if
>> any tool expects the messages to be sorted by a monotonic clock. In
>> fact, it might be useful to see that some messages are disordered
>> against the real time, e.g. because of the leaf second.

I've tested v2 with the leap second and haven't seen anything unusual on Fedora23.

> 
> Not only leap seconds, it's also settimeofday and NTP might make the wall time
> jump under certain conditions.

Also tried this as well to set the time to different timezones as well as
setting the RTC in BIOS to the wrong time to see if there were any issues.
Again, nothing seemed to happen.

... noting of course the previously mentioned issue with /var/log/messages &
systemd that Petr found.

So IIUC ... I want real time to be reported (not boot or TAI), use tglx's
suggestion of ktime_get_log_ts(), and implement printk.time=1 (local_clock())
and printk.time=2 (real clock).

Is that correct?

P.

> 
> Thanks,
> 
> 	tglx
> 

[toc] | [next] | [standalone]


#1314815

FromThomas Gleixner <tglx@linutronix.de>
Date2016-01-22 09:10 +0100
Message-ID<qTEX8-1ic-1@gated-at.bofh.it>
In reply to#1314323
On Thu, 21 Jan 2016, Prarit Bhargava wrote:
> So IIUC ... I want real time to be reported (not boot or TAI), use tglx's
> suggestion of ktime_get_log_ts(), and implement printk.time=1 (local_clock())
> and printk.time=2 (real clock).

I'd like to see an option for clock mono as well. That helps to correlate
other things like user space tracing.

Thanks,

	tglx

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web