LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: "Liu, Chuansheng" <chuansheng.liu@intel.com>,
"Fu, Zhonghui" <zhonghui.fu@linux.intel.com>,
"Brown, Len" <len.brown@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
trivial@kernel.org
Subject: Re: Change behaviour when tracing ... nasty trap (was Re: [PATCH] PM/Trace: get rid of synchronous resume limit during PM trace)
Date: Mon, 26 Jan 2015 14:43:04 +0100 [thread overview]
Message-ID: <20150126134304.GA7889@amd> (raw)
In-Reply-To: <2718950.eck1siDzqK@vostro.rjw.lan>
Document pm_tracing actually affecting suspend in non-trivial way.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
On Mon 2015-01-26 14:41:02, Rafael J. Wysocki wrote:
> On Monday, January 26, 2015 12:05:16 PM Pavel Machek wrote:
> > On Mon 2015-01-26 10:39:04, Liu, Chuansheng wrote:
> > > > > @@ -517,8 +517,7 @@ static int device_resume_noirq(struct device *dev,
> > > > pm_message_t state, bool asyn
> > > > >
> > > > > static bool is_async(struct device *dev)
> > > > > {
> > > > > - return dev->power.async_suspend && pm_async_enabled
> > > > > - && !pm_trace_is_enabled();
> > > > > + return dev->power.async_suspend && pm_async_enabled;
> > > > > }
> > > > >
> > > >
> > > > Actually... whoever did the original patch was evil person. Changing
> > > > behaviour when tracing is requested is evil, evil, evil. Git blame
> > > > tells me
> > > >
> > > > Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> > > >
> > > > went to the dark side.
> > >
> > > Although I didn't get where is something wrong, but the is_async() is not created by my commit,
> > > it is from commit (PM: Start asynchronous resume threads upfront), I just moved it ahead.
> > >
> > > And like other phases, I added it into resum/suspend_noirq()...
> >
> > I see, blame blamed wrong person. It looks like Rafael is evil:
> >
> > commit 97df8c12995c5bac73e3bfeea4c5be155c1f4401
> > Author: Rafael J. Wysocki <rjw@sisk.pl>
> > Date: Sat Jan 23 22:25:31 2010 +0100
> >
> > PM: Start asynchronous resume threads upfront
>
> This only means we won't use asyc suspend/resume at all when the RTC-based
> resume debug is enabled, because it wouldn't make sense (the RTC-based
> debug requires strict ordering of callbacks between devices or we may find
> that device A hanged the resume while actually device B that was running in
> parallel with A did that).
>
> And I shouldn't even need to explain this ... Sad.
Well, I forgot that pm_trace_is_enabled() is the simple, RTC based
one, and believe it would be worth a comment...
diff --git a/Documentation/power/s2ram.txt b/Documentation/power/s2ram.txt
index 1bdfa04..4685aee 100644
--- a/Documentation/power/s2ram.txt
+++ b/Documentation/power/s2ram.txt
@@ -69,6 +69,10 @@ Reason for this is that the RTC is the only reliably available piece of
hardware during resume operations where a value can be set that will
survive a reboot.
+pm_trace is not compatible with asynchronous suspend, so it turns
+asynchronous suspend off (which may work around timing or
+ordering-sensitive bugs).
+
Consequence is that after a resume (even if it is successful) your system
clock will have a value corresponding to the magic number instead of the
correct date/time! It is therefore advisable to use a program like ntp-date
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2015-01-26 13:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 5:07 [PATCH] PM/Trace: get rid of synchronous resume limit during PM trace Fu, Zhonghui
2015-01-26 7:59 ` Fu, Zhonghui
2015-01-26 13:44 ` Rafael J. Wysocki
2015-01-26 10:23 ` Change behaviour when tracing ... nasty trap (was Re: [PATCH] PM/Trace: get rid of synchronous resume limit during PM trace) Pavel Machek
2015-01-26 10:39 ` Liu, Chuansheng
2015-01-26 11:05 ` Pavel Machek
2015-01-26 13:41 ` Rafael J. Wysocki
2015-01-26 13:43 ` Pavel Machek [this message]
2015-01-30 0:53 ` Rafael J. Wysocki
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=20150126134304.GA7889@amd \
--to=pavel@ucw.cz \
--cc=chuansheng.liu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=trivial@kernel.org \
--cc=zhonghui.fu@linux.intel.com \
--subject='Re: Change behaviour when tracing ... nasty trap (was Re: [PATCH] PM/Trace: get rid of synchronous resume limit during PM trace)' \
/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
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).