From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Ruchi Kandoi <kandoiruchi@google.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Greg Hackmann <ghackmann@google.com>,
John Stultz <john.stultz@linaro.org>,
Todd Poynor <toddpoynor@google.com>
Subject: Re: [PATCH v3] power: add an API to log wakeup reasons
Date: Fri, 14 Mar 2014 02:06:42 +0100 [thread overview]
Message-ID: <11925125.x6prlrSt00@vostro.rjw.lan> (raw)
In-Reply-To: <CAL8qYTMKM-DrkxED-51YPRczWJpeEfZy25PORtUasi=7e58i6Q@mail.gmail.com>
On Thursday, March 13, 2014 05:43:20 PM Ruchi Kandoi wrote:
> This should be true most of the times.
>
> But there might be cases otherwise too.
>
> For instance, there was a bug earlier with wi-fi which would cause the
> system to wake up but not get hold of a wakeup source because there
> wasn't any work for it to do. In that case, the wakeup sources would
> not log such an event.
>
> Additionally, there could be a situation where an IRQ caused the
> system to resume from suspend. And since the system was up, a driver
> could take a wakeup source. In this case we would assume that the
> driver would have woken the system, but in reality the driver held the
> wakeup source only because the system was up and did not cause the
> wake up to happen.
But you can create special wakeup sources associated with interrupts (in
addition to the existing ones) and use the statistics for those.
It is possible to define wakeup sources that don't correspond to any
devices.
Rafael
> On Thu, Mar 13, 2014 at 3:18 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > Hi,
> >
> > I saw the v4, but I don't have it handy, so replying here.
> >
> > On Wednesday, March 12, 2014 12:46:38 PM Ruchi Kandoi wrote:
> >> For power management diagnostic purposes, it is often useful to know
> >> what interrupts are frequently waking the system from low power
> >> suspend mode, especially on battery-powered consumer electronics
> >> devices that are expected to spend much of their time in low-power
> >> suspend while not in active use. For example, reduced battery life on
> >> a mobile phone may be caused in part by frequent wakeups by broadcast
> >> traffic on a busy wireless LAN even while the screen is off and the
> >> phone not in active use.
> >>
> >> Add API log_wakeup_reason() exposes it to userspace via the sysfs path
> >> /sys/kernel/wakeup_reasons/last_resume_reason. This API would be called
> >> from the paltform specific, or from the driver for the interrupt controller,
> >> when the system resumes because of an IRQ. It logs the reasons which caused
> >> the system to wakeup from the low-power mode.
> >
> > So what exactly is wrong with using wakeup sources for this purpose?
> >
> > --
> > I speak only for myself.
> > Rafael J. Wysocki, Intel Open Source Technology Center.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2014-03-14 0:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 19:46 Ruchi Kandoi
2014-03-12 19:50 ` Joe Perches
2014-03-13 22:18 ` Rafael J. Wysocki
2014-03-14 0:43 ` Ruchi Kandoi
2014-03-14 1:06 ` Rafael J. Wysocki [this message]
2014-03-14 2:15 ` Ruchi Kandoi
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=11925125.x6prlrSt00@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=ghackmann@google.com \
--cc=john.stultz@linaro.org \
--cc=kandoiruchi@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=toddpoynor@google.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
all inboxes | Powered by JetHome®