From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: "Alan Stern" <stern@rowland.harvard.edu>,
"Arve Hjønnevåg" <arve@android.com>,
"Linux-pm mailing list" <linux-pm@lists.linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: PM / Wakeup: Introduce wakeup source objects and event statistics (v2)
Date: Fri, 17 Sep 2010 02:54:19 +0200 [thread overview]
Message-ID: <201009170254.19753.rjw@sisk.pl> (raw)
In-Reply-To: <87eict5hhx.fsf@deeprootsystems.com>
On Friday, September 17, 2010, Kevin Hilman wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
>
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > Subject: PM / Wakeup: Introduce wakeup source objects and event statistics (v2)
> >
> > Introduce struct wakeup_source for representing system wakeup sources
> > within the kernel and for collecting statistics related to them.
> > Make the recently introduced helper functions pm_wakeup_event(),
> > pm_stay_awake() and pm_relax() use struct wakeup_source objects
> > internally, so that wakeup statistics associated with wakeup devices
> > can be collected and reported in a consistent way (the definition of
> > pm_relax() is changed, which is harmless, because this function is
> > not called directly by anyone yet). Introduce new wakeup-related
> > sysfs device attributes in /sys/devices/.../power for reporting the
> > device wakeup statistics.
> >
> > Change the global wakeup events counters event_count and
> > events_in_progress into atomic variables, so that it is not necessary
> > to acquire a global spinlock in pm_wakeup_event(), pm_stay_awake()
> > and pm_relax(), which should allow us to avoid lock contention in
> > these functions on SMP systems with many wakeup devices.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> Hi Rafael,
>
> This looks like a really useful feature.
Great!
> Was doing some experiments with this on OMAP, and found a minor
> cut-and-paste bug in the Documentation file:
>
> [...]
>
> > +What: /sys/devices/.../power/wakeup_max_time_ms
> > +Date: September 2010
> > +Contact: Rafael J. Wysocki <rjw@sisk.pl>
> > +Description:
> > + The /sys/devices/.../wakeup_max_time_ms attribute contains
> > + the maximum time of processing a single wakeup event associated
> > + with the device, in milliseconds. This attribute is read-only.
> > + If the device is not enabled to wake up the system from sleep
> > + states, this attribute is empty.
> > +
> > +What: /sys/devices/.../power/wakeup_max_time_ms
> ^^^
> s/max/last/ for this one.
Ah, thanks a lot.
> > +Date: September 2010
> > +Contact: Rafael J. Wysocki <rjw@sisk.pl>
> > +Description:
> > + The /sys/devices/.../wakeup_last_time_ms attribute contains
> > + the value of the monotonic clock corresponding to the time of
> > + signaling the last wakeup event associated with the device, in
> > + milliseconds. This attribute is read-only. If the device is
> > + not enabled to wake up the system from sleep states, this
> > + attribute is empty.
Rafael
next prev parent reply other threads:[~2010-09-17 0:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.1008201051490.1716-100000@iolanthe.rowland.org>
2010-09-07 23:51 ` [RFC][PATCH] PM / Wakeup: Introduce wakeup source objects and event statistics (was: Re: Wakeup-events implementation) Rafael J. Wysocki
2010-09-08 20:17 ` Alan Stern
2010-09-08 23:58 ` Rafael J. Wysocki
2010-09-10 15:21 ` Alan Stern
2010-09-10 22:29 ` Rafael J. Wysocki
2010-09-14 22:31 ` PM / Wakeup: Introduce wakeup source objects and event statistics (v2) Rafael J. Wysocki
2010-09-17 0:41 ` Kevin Hilman
2010-09-17 0:54 ` Rafael J. Wysocki [this message]
2010-09-17 14:03 ` Alan Stern
2010-09-17 22:26 ` 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=201009170254.19753.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=arve@android.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/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