From: Chen Yu <yu.c.chen@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
x86@kernel.org, John Stultz <john.stultz@linaro.org>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, Xunlei Pang <xlpang@redhat.com>,
"Zhang, Rui" <rui.zhang@intel.com>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH][RFC v5] timekeeping: Ignore the bogus sleep time if pm_trace is enabled
Date: Sat, 10 Sep 2016 17:40:49 +0800 [thread overview]
Message-ID: <20160910094049.GA12100@sharon> (raw)
In-Reply-To: <alpine.DEB.2.20.1609091551110.5679@nanos>
Hi,
On Fri, Sep 09, 2016 at 04:33:59PM +0200, Thomas Gleixner wrote:
> On Fri, 9 Sep 2016, Chen Yu wrote:
>
> > +extern void pm_trace_untaint_timekeeping(void);
>
> And how exactly do you untaint it? Just by clearing the flags. That makes
> the RTC time magically correct again?
>
> > +int arch_pm_trace_taint_pclock(void)
> > +{
> > + return (x86_platform.get_wallclock == mach_get_cmos_time);
> > +}
>
> Groan. I told you to do it in the mc14xxx related places. There are not
> that many in the kernel
>
> Here is a completely uncompiled/untested patch which should address the
> issue in a halfways clean way.
>
> Thanks,
>
> tglx
>
OK, I made some small adjustment to make it compiled without pm_trace
configured, and this version is absolutely more professional than
my previous one. I'll do some testing based on it.
Besides I have another question related to the untain
of the pm_trace_rtc_abused flag: after resume back, if the user disabled
the pm_trace, then the following suspend/resume sleep time should become
valid again IMO, because we use the delta rather than the RTC itself for
suspend/resume. So in this version it disable the injection of sleep time
once pm_trace has been used?
Thanks,
Yu
prev parent reply other threads:[~2016-09-10 9:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-28 16:40 [PATCH][RFC v5] timekeeping: Ignore the bogus sleep time if pm_trace is enabled Chen Yu
2016-08-31 0:31 ` Rafael J. Wysocki
2016-09-02 19:26 ` Thomas Gleixner
2016-09-04 15:37 ` Chen Yu
2016-09-05 7:54 ` Thomas Gleixner
2016-09-09 5:37 ` Chen Yu
2016-09-09 14:33 ` Thomas Gleixner
2016-09-10 9:40 ` Chen Yu [this message]
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=20160910094049.GA12100@sharon \
--to=yu.c.chen@intel.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xlpang@redhat.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;
as well as URLs for NNTP newsgroup(s).