Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532032
| From | Chen Yu <yu.c.chen@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled |
| Date | 2016-11-29 10:30 +0100 |
| Message-ID | <sIMTD-6Co-11@gated-at.bofh.it> (permalink) |
| References | <sICKB-89o-17@gated-at.bofh.it> <sICKB-89o-15@gated-at.bofh.it> <sIL1w-5fn-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 29, 2016 at 08:19:55AM +0100, Ingo Molnar wrote:
>
> * John Stultz <john.stultz@linaro.org> wrote:
>
> > From: Chen Yu <yu.c.chen@intel.com>
> >
> > Previously we encountered some memory overflow issues due to
> > the bogus sleep time brought by inconsistent rtc, which is
> > triggered when pm_trace is enabled, and we have fixed it
> > in recent kernel. However it's improper in the first place
> > to call __timekeeping_inject_sleeptime() in case that pm_trace
> > is enabled simply because that "hash" time value will wreckage
> > the timekeeping subsystem.
>
> s/
>
> Previously we encountered memory overflow issues due to
> bogus sleep time brought by an inconsistent RTC, which is
> triggered when pm_trace is enabled, and we have fixed it
> in recent kernels. However it's improper in the first place
> to call __timekeeping_inject_sleeptime() in case pm_trace
> is enabled simply because the "hash" time value will wreckage
> the timekeeping subsystem.
>
> Half a dozen typos ...
>
> > This patch is originally written by Thomas, which would bypass
> > the bogus rtc interval when pm_trace is enabled.
> > Meanwhile, if system succeed to resume back with pm_trace set, the
> > users are warned to adjust the bogus rtc either by 'ntpdate' or
> > 'rdate', by resetting pm_trace_rtc_abused to false, otherwise above
> > tools might not work as expected.
>
> s/
>
> This patch was originally written by Thomas, which would bypass
> the bogus RTC interval when pm_trace is enabled.
> Meanwhile, if the system succeeds to resume back with pm_trace set,
> users are warned to adjust the bogus RTC either by 'ntpdate' or
> 'rdate', by resetting pm_trace_rtc_abused to false, otherwise above
> tools might not work as expected.
>
> > + /*
> > + * If pm_trace abused the RTC as storage set the timespec to 0
> > + * which tells the caller that this RTC value is bogus.
> > + */
>
> s/
> /*
> * If pm_trace abused the RTC as storage, set the timespec to 0,
> * which tells the caller that this RTC value is bogus.
> */
>
> > @@ -74,6 +75,9 @@
> >
> > #define DEVSEED (7919)
> >
> > +bool pm_trace_rtc_abused __read_mostly;
> > +EXPORT_SYMBOL(pm_trace_rtc_abused);
>
> EXPORT_SYMBOL_GPL()
>
> > +static int pm_trace_notify(struct notifier_block *nb,
> > + unsigned long mode, void *_unused)
>
> Please no nonsensical linebreaks in the middle of an argument list.
>
> > +{
> > + switch (mode) {
> > + case PM_POST_HIBERNATION:
> > + case PM_POST_SUSPEND:
> > + if (pm_trace_rtc_abused) {
> > + pm_trace_rtc_abused = false;
> > + pr_warn("Possible incorrect RTC due to pm_trace, please use 'ntpdate' or 'rdate' to reset.\n");
>
>
> s/to reset./to reset it.
>
> Thanks,
>
> Ingo
Thanks Ingo, I've sent out a new versin based on your comments.
Yu
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled John Stultz <john.stultz@linaro.org> - 2016-11-28 23:40 +0100
Re: [PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled Ingo Molnar <mingo@kernel.org> - 2016-11-29 08:30 +0100
Re: [PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled Chen Yu <yu.c.chen@intel.com> - 2016-11-29 10:30 +0100
[tip:timers/core] timekeeping: Ignore the bogus sleep time if pm_trace is enabled tip-bot for Chen Yu <tipbot@zytor.com> - 2016-11-29 18:20 +0100
csiph-web