Messages in this thread | | | Date | Fri, 4 Apr 2014 12:09:21 -0700 | Subject | Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline | From | Linus Torvalds <> |
| |
On Fri, Apr 4, 2014 at 11:57 AM, Andy Lutomirski <luto@amacapital.net> wrote: > > What would break if we used CLOCK_BOOTTIME or CLOCK_MONOTONIC?
I wouldn't object to trying - I thought you meant changing the format itself. If we keep the semantics (seconds since boot) but just change the clock source in other ways, I wouldn't worry.
Of course, one issue is locking and performance. Most clock sources are nasty as hell to read. "sched_clock()" is special.
But I'm absolutely ok with trying things out, so if you have an idea for a patch...
> It would be really neat if we even went back and edited the queued up > messages once we have a clocksource.
Sounds great, I'd love to see it. Patches welcome ;)
> There are also log message metadata fields now; we could stick more > than one timestamp in there, and existing tools either won't see them > at all (if they use klogctl) or they already know how to ignore > unknown fields (/dev/kmsg).
That sounds like overkill, but trying to aim for something that is actually accurate to within a second is fine.
That said, I *also* suspect that we could easily just have a simple heartbeat message that gives accurate real time. Adding a kernel heartbeat to dmesg is something I've often wanted to have myself. Having something that prints out real wall-clock time every 30 minutes or so in dmesg does not sound like a bad idea, and could be used to correct for time skew with the existing one even if we decided that CLOCK_BOOTTIME has too many locking/performance issues.
Linus
| |