linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	"3.17+" <stable@vger.kernel.org>, 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: Sun, 4 Sep 2016 23:37:39 +0800	[thread overview]
Message-ID: <20160904153739.GA5400@sharon> (raw)
In-Reply-To: <alpine.DEB.2.20.1609022119160.5647@nanos>

Hi Thomas, Rafael,
On Fri, Sep 02, 2016 at 09:26:51PM +0200, Thomas Gleixner wrote:
> On Wed, 31 Aug 2016, Rafael J. Wysocki wrote:
> > On Monday, August 29, 2016 12:40:39 AM Chen Yu wrote:
> > > +
> > > +	/*
> > > +	 * Make rtc-based persistent clock unusable
> > > +	 * if pm_trace is enabled, only take effect
> > > +	 * for timekeeping_suspend/resume.
> > > +	 */
> > > +	if (pm_trace_is_enabled() &&
> > > +	    x86_platform.get_wallclock == mach_get_cmos_time) {
> > > +		ts->tv_sec = 0;
> > > +		ts->tv_nsec = 0;
> > > +	}
> > 
> > I'm not sure about this.  Looks hackish.
> 
> Indeed. Can't you just keep track that pm_trace fiddled with the cmos clock
> and then discard the value either in the core or in mach_get_cmos_time()
The previous version is more straightforward, since
it ignored the bogus rtc in core. Would you please take
a glance at it too, thanks:
https://patchwork.kernel.org/patch/9287347/

Thanks,
Yu

  reply	other threads:[~2016-09-04 15:29 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 [this message]
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

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=20160904153739.GA5400@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=stable@vger.kernel.org \
    --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).