From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Liu, ShuoX" <shuox.liu@intel.com>,
"linux-pm@lists.linux-foundation.org"
<linux-pm@lists.linux-foundation.org>, Greg KH <gregkh@suse.de>,
"Brown, Len" <len.brown@intel.com>
Subject: Re: [PATCH] PM: add statistics sysfs file for suspend to ram
Date: Mon, 08 Aug 2011 11:48:24 +0800 [thread overview]
Message-ID: <1312775304.2043.37.camel@ymzhang> (raw)
In-Reply-To: <201108052120.14901.rjw@sisk.pl>
On Fri, 2011-08-05 at 21:20 +0200, Rafael J. Wysocki wrote:
> On Friday, August 05, 2011, Yanmin Zhang wrote:
> > On Fri, 2011-08-05 at 09:57 +0800, Liu, ShuoX wrote:
> > > > On Thursday, August 04, 2011, Greg KH wrote:
> > > > > On Thu, Aug 04, 2011 at 01:13:38PM +0800, Liu, ShuoX wrote:
> > > > > > >From a906b0b5b4ff3414ceb9fc7a69a3d7c9d66e46b1 Mon Sep 17
> > > > 00:00:00 2001
> > > > > > From: ShuoX Liu <shuox.liu@intel.com>
> > > > > > Date: Thu, 28 Jul 2011 10:54:22 +0800
> > > > > > Subject: [PATCH] PM: add statistics sysfs file for suspend to ram.
> > > > >
> > > > > What's this stuff here for? That's not needed (hint, I would have to
> > > > > edit it out by hand to be able to apply this patch.)
> > > > >
> > > > > Thanks for resending a version that passes checkpatch.pl and could be
> > > > > applied, but all of my previous comments still stand. This patch, as
> > > > > is, is totally unacceptable.
> > > >
> > > > Agreed, plus I'd like to know the motivation behind it. That is, we have
> > > > quite a few debug facilities in that code, so why are they insufficient?
> > Thanks Greg, Rafael. We are changing the patch based on your comments.
> >
> > >
> > > Some explanation from Yanmin,
> > > "We are enabling power features on Medfield. Some testers and developers
> > > complain they don't know if system tries suspend-2-ram, and what device
> > > fails to suspend. They need such info for a quick check. If turning on
> > > CONFIG_PM_DEBUG, we get too much info and testers need recompile
> > > the system.
> > Comparing with PC/notebook, a mobile enters/exits suspend-2-ram (we call it s3 on
> > Medfield) far more frequently. If it can't enter suspend-2-ram in time, the power
> > might be used up soon.
> >
> > We often find sometimes, a device suspend fails. Then, system retries s3 over
> > and over again. As display is off, testers/developers don't know what happens.
> > Teh system
> >
> > With the patch, we could know what the bad device is.
> >
> > The patch doesn't hurt performance as it's just statistics collector.
> >
> > CONFIG_PM_DEBUG is very useful for finer investigation about what happens behind. What
> > we provide by the patch is to analyze the issues quickly, even by an ordinary tester.
>
> Well, what about using dynamic debug?
Thanks for the nice pointer. I checked dynamic debug. It's really a good debug tool.
With the dynamic debug:
1) user need write a user space parser to process the syslog output;
2) Our testing scenario is we leave the mobile for at least hours. Then, check its status.
No serial console available during the testing. One is because console would be suspended,
and the other is serial console connecting with spi or HSU devices would consume power. These
devices are powered off at suspend-2-ram.
Below is an example output of the statistics from my mobile (we are changing the output
from sysfs to debugfs now):
#adb shell cat /sys/power/suspend_stats
success: 5
fail: 1
failed_freeze: 0
failed_prepare: 0
failed_suspend: 1
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_noirq: 0
failed_devs:
last_failed: alarm
next prev parent reply other threads:[~2011-08-08 3:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-04 5:13 [PATCH] PM: add statistics sysfs file for suspend to ram Liu, ShuoX
2011-08-04 5:27 ` Greg KH
2011-08-04 9:32 ` Rafael J. Wysocki
2011-08-05 1:57 ` Liu, ShuoX
2011-08-05 3:19 ` Yanmin Zhang
2011-08-05 19:20 ` Rafael J. Wysocki
2011-08-08 3:48 ` Yanmin Zhang [this message]
2011-08-08 20:37 ` Rafael J. Wysocki
2011-08-08 21:01 ` Greg KH
2011-08-08 21:05 ` Pavel Machek
2011-08-08 21:14 ` Rafael J. Wysocki
2011-08-08 21:54 ` Pavel Machek
2011-08-08 22:09 ` Rafael J. Wysocki
2011-08-10 22:27 ` Pavel Machek
2011-08-11 19:48 ` Rafael J. Wysocki
2011-08-04 19:05 ` Len Brown
2011-08-04 19:17 ` Randy Dunlap
2011-08-04 19:50 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2011-08-04 5:09 Liu, ShuoX
2011-08-04 5:16 ` Greg KH
2011-08-04 5:17 ` Greg KH
2011-08-03 17:37 ` Pavel Machek
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=1312775304.2043.37.camel@ymzhang \
--to=yanmin_zhang@linux.intel.com \
--cc=gregkh@suse.de \
--cc=len.brown@intel.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--cc=shuox.liu@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;
as well as URLs for NNTP newsgroup(s).