Re: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
"Roberto A. Foglietta" <[email protected]> Tue, 21 Apr 2026 11:51:44 +0200
| Newsgroups | org.kernel.vger.linux-embedded,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAJGKYO6c1g0WCeQmZmbKkVgDgnSyOF4oCw5JUuxAdoCdH8nHtg@mail.gmail.com> |
On Tue, 21 Apr 2026 at 10:36, Petr Mladek <[email protected]> wrote: > > On Mon 2026-04-20 22:18:29, Bird, Tim wrote: > > > From: Petr Mladek <[email protected]> > > > 2. The early timestamps provided by the bogo cycles > > > are not synchronized with timestamps from > > > the proper time keeping. > > > > > > Would it help to print a disclaimer, similar to, > > > for example, trace_printk() first use? Every timestamp before the timekeeper init is arbitrary wrong or unreliable, or it is a hardware value from a registry. As simple as that. > > > Something like: > > > > > > [ 0.002912] ********************************************************** > > > [ 0.002917] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > > [ 0.002921] ** > > > [ 0.002935] ** Using BOGO early timestamps > > > [ 0.002939] ** > > > [ 0.002943] ** They are not properly calibrated and might use a source > > > [ 0.002949] ** with an unstable frequency. > > > [ 0.002953] ** > > > [ 0.002957] ** They are not comparable with timestamps after > > > [ 0.002961] ** the timekeeping is initialized. > > > [ 0.002966] ** > > > [ 0.002968] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > > [ 0.002971] ******************************************************* > > Considering that it is supposed to be a debug feature, a large banner like timesquare end of WW2 seems the most appropriate way to "not interfere with the process under debug". Can we also have a playable ASCII doom version of it? Use a negative number to indicate something that precedes the time. A negative number where a timestamp is expected should puzzle every reasonable mind, plus this feature is for debugging and it is not supposed to be seen in production. Or even simpler printing a registry value and let the "expert senior" that activated that hacking dealing with it. The kernel has no time to print? Then, don't mimic time. Hence patch V6 Best regards, R-