Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1690822
| From | Mark Salyzyn <salyzyn@android.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) |
| Date | 2017-07-19 01:30 +0200 |
| Message-ID | <u4K6f-ns-31@gated-at.bofh.it> (permalink) |
| References | <u4I4q-7z6-5@gated-at.bofh.it> <u4IH8-7NO-23@gated-at.bofh.it> <u4IQO-86Q-27@gated-at.bofh.it> <u4JjQ-8ii-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[TL;DR] On 07/18/2017 03:35 PM, Thomas Gleixner wrote: > Can we please fix the tools and not introduce that horror in the kernel? IMHO, we can switch this patch to epoch.ns time; but the momentum on the tools will end up with us internally patching it back to RTC format at least until we can get our act together ... I have accepted that risk, we always like to see all changes upstream though. Would an additional config parameter appease the situation? > Just for the record: You cannot use that stuff deep in the suspend/resume > code because timekeeping is suspended there as well and that call to > getnstimeofday() is going to trigger a WARNON() when called after > timekeeping was suspended. So please be more precise about the limitations > of this. Yes, I should have been clearer about that, in fact my comments in 0/4 were _backwards_ when I reread them ;-/. One of the issues is the somewhat helpful suspend millisecond duration requires a persistent clock, which is _not_ available on all hardware. Printing the time on entry and exit from suspend and resume is always possible because we are staying away from that lower level issue. I should probably roll the details of 0/4 comments into 1/4, the intro has not served its purpose. It should also be made clearer that these single messages serve _two_ purposes, the primary one is power analysis; the secondary one is log synchronization. > There was some discussion about making the clock source for dmesg time > stamps selectable, so you can use MONOTONIC, REALTIME, BOOTTIME. The > patches looked sensible, but there was some showstopper vs. the user space > dmesg utility. See: The timestamps are useful for the 'second' purpose of these patches when dmesg time is BOOTTIME or MONOTONIC, and can be turned off if REALTIME is selected. Having rtc_show_time a single point for switching this no doubt helps, not hinders, that dmesg issue. The inflection points would still serve a purpose, still need suspend/resume/hibernate/restore. The reboot messages are _only_ useful to us with their timestamps, as I checked and the only tools that use those are for log synchronization. We may be able to do away with them on REALTIME dmesg'ing; but the standardization of the message as a marker would have a legacy purpose (!) NB: We have a similar configuration for the user space logger, which can be configured to report in MONOTONIC time. We have yet to have a vendor use the feature, opting for REALTIME logging for user space activities. Our klogd (which runs at background priority and is batched) manages a histogram relationship between MONOTONIC and REALTIME helped by these prints and incorporates the REALTIME dmesg logs merged into our user space logging database. -- Mark
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn <salyzyn@android.com> - 2017-07-18 23:20 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Thomas Gleixner <tglx@linutronix.de> - 2017-07-19 00:00 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn <salyzyn@android.com> - 2017-07-19 00:10 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Thomas Gleixner <tglx@linutronix.de> - 2017-07-19 00:40 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn <salyzyn@android.com> - 2017-07-19 01:30 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Thomas Gleixner <tglx@linutronix.de> - 2017-07-19 09:30 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Prarit Bhargava <prarit@redhat.com> - 2017-07-19 14:10 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Thomas Gleixner <tglx@linutronix.de> - 2017-07-19 14:30 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Prarit Bhargava <prarit@redhat.com> - 2017-07-19 16:30 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn <salyzyn@android.com> - 2017-07-19 20:20 +0200
Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Pavel Machek <pavel@ucw.cz> - 2017-07-20 10:30 +0200
csiph-web