From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org, mingo@elte.hu,
pavel@suse.cz
Subject: Re: [patch 2.6.26-rc4-git] PM: boot time suspend selftest
Date: Sun, 6 Jul 2008 21:12:38 -0700 [thread overview]
Message-ID: <200807062112.38209.david-b@pacbell.net> (raw)
In-Reply-To: <20080529162257.03426e48.akpm@linux-foundation.org>
Address some of Andrew's comments on the patch now in
MMOTM with name "pm-boot-time-suspend-selftest.patch".
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
kernel/power/main.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
--- a/kernel/power/main.c 2008-07-06 21:06:35.000000000 -0700
+++ b/kernel/power/main.c 2008-07-06 21:06:35.000000000 -0700
@@ -160,10 +160,19 @@ static void suspend_test_finish(const ch
long nj = jiffies - suspend_test_start_time;
unsigned msec;
- msec = jiffies_to_msecs((nj >= 0) ? nj : -nj);
+ msec = jiffies_to_msecs(abs(nj));
pr_info("PM: %s took %d.%03d seconds\n", label,
msec / 1000, msec % 1000);
- WARN_ON_ONCE(msec > (TEST_SUSPEND_SECONDS * 1000));
+
+ /* Warning on suspend means the RTC alarm period needs to be
+ * larger -- the system was sooo slooowwww to suspend that the
+ * alarm (should have) fired before the system went to sleep!
+ *
+ * Warning on either suspend or resume also means the system
+ * has some performance issues. The stack dump of a WARN_ON
+ * is more likely to get the right attention than a printk...
+ */
+ WARN_ON(msec > (TEST_SUSPEND_SECONDS * 1000));
}
#else
@@ -579,13 +588,13 @@ core_initcall(pm_init);
static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state)
{
- static char err_readtime [] __initdata =
+ static char err_readtime[] __initdata =
KERN_ERR "PM: can't read %s time, err %d\n";
- static char err_wakealarm [] __initdata =
+ static char err_wakealarm [] __initdata =
KERN_ERR "PM: can't set %s wakealarm, err %d\n";
- static char err_suspend [] __initdata =
+ static char err_suspend[] __initdata =
KERN_ERR "PM: suspend test failed, error %d\n";
- static char info_test [] __initdata =
+ static char info_test[] __initdata =
KERN_INFO "PM: test RTC wakeup from '%s' suspend\n";
unsigned long now;
next prev parent reply other threads:[~2008-07-07 4:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 20:33 David Brownell
2008-05-29 21:01 ` Rafael J. Wysocki
2008-05-29 21:26 ` David Brownell
2008-05-29 21:29 ` Rafael J. Wysocki
2008-05-29 23:06 ` Andrew Morton
2008-05-30 4:34 ` David Brownell
2008-05-29 23:22 ` Andrew Morton
2008-05-30 10:59 ` Ingo Molnar
2008-05-30 19:04 ` Andrew Morton
2008-06-03 9:27 ` [PATCH] add a printk_init variant storing format strings in __initdata Andy Whitcroft
2008-06-03 16:41 ` Johannes Weiner
2008-06-03 17:49 ` [linux-pm] " Johannes Berg
2008-06-04 8:16 ` Andrew Morton
2008-06-04 8:32 ` MinChan Kim
2008-06-04 8:59 ` David Woodhouse
2008-06-04 9:10 ` [linux-pm] " Johannes Berg
2008-06-04 9:17 ` David Woodhouse
2008-06-04 10:51 ` Johannes Berg
2008-06-04 11:43 ` Alan Cox
2008-06-04 8:56 ` David Woodhouse
2008-06-03 10:45 ` [patch 2.6.26-rc4-git] PM: boot time suspend selftest Andy Whitcroft
2008-07-07 4:12 ` David Brownell [this message]
2008-07-23 8:19 ` Andrew Morton
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=200807062112.38209.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=pavel@suse.cz \
/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
all inboxes | Powered by JetHome®