From: Ingo Molnar <mingo@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Chen Yu <yu.c.chen@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Xunlei Pang <xlpang@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Len Brown <lenb@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Pavel Machek <pavel@ucw.cz>, Thomas Gleixner <tglx@linutronix.de>,
Prarit Bhargava <prarit@redhat.com>,
Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled
Date: Tue, 29 Nov 2016 08:19:55 +0100 [thread overview]
Message-ID: <20161129071955.GB29412@gmail.com> (raw)
In-Reply-To: <1480372524-15181-3-git-send-email-john.stultz@linaro.org>
* 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
next prev parent reply other threads:[~2016-11-29 7:20 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 22:35 [GIT PULL][PATCH 0/7] Timekeeping changes for 4.10 (take 2) John Stultz
2016-11-28 22:35 ` [PATCH 1/7] selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous" John Stultz
2016-11-29 17:10 ` [tip:timers/core] " tip-bot for Colin Ian King
2016-11-28 22:35 ` [PATCH 2/7] timekeeping: Ignore the bogus sleep time if pm_trace is enabled John Stultz
2016-11-29 7:19 ` Ingo Molnar [this message]
2016-11-29 9:38 ` Chen Yu
2016-11-29 17:10 ` [tip:timers/core] " tip-bot for Chen Yu
2016-11-28 22:35 ` [PATCH 3/7] timekeeping: clocksource_cyc2ns: Document intended range limitation John Stultz
2016-11-29 17:11 ` [tip:timers/core] timekeeping/clocksource_cyc2ns: " tip-bot for Chris Metcalf
2016-11-28 22:35 ` [PATCH 4/7] time: alarmtimer: Add the tracepoints for alarmtimer John Stultz
2016-11-29 7:23 ` Ingo Molnar
2016-11-29 8:23 ` Baolin Wang
2016-11-29 9:12 ` Ingo Molnar
2016-11-29 11:52 ` Baolin Wang
2016-11-29 12:06 ` Thomas Gleixner
2016-11-30 11:43 ` Baolin Wang
2016-12-01 2:34 ` Baolin Wang
2016-12-01 13:52 ` [tip:timers/core] alarmtimer: Add tracepoints for alarm timers tip-bot for Baolin Wang
2016-11-28 22:35 ` [PATCH 5/7] timekeeping: Add a fast and NMI safe boot clock John Stultz
2016-11-29 17:11 ` [tip:timers/core] " tip-bot for Joel Fernandes
2016-11-28 22:35 ` [PATCH 6/7] trace: Add an option for boot clock as trace clock John Stultz
2016-11-28 23:05 ` Steven Rostedt
2016-11-29 17:12 ` [tip:timers/core] " tip-bot for Joel Fernandes
2016-11-28 22:35 ` [PATCH 7/7] trace: Update documentation for mono, mono_raw and boot clock John Stultz
2016-11-28 23:07 ` Steven Rostedt
2016-11-29 7:26 ` Ingo Molnar
2016-11-29 16:10 ` Joel Fernandes
2016-11-29 16:11 ` Thomas Gleixner
2016-11-29 17:13 ` [tip:timers/core] " tip-bot for Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161129071955.GB29412@gmail.com \
--to=mingo@kernel.org \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=prarit@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=xlpang@redhat.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome