From: Jean Pihet <jean.pihet@newoldbits.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>,
mingo@elte.hu, trenn@suse.de, Len Brown <len.brown@intel.com>,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
Arjan van de Ven <arjan@linux.intel.com>,
linux-perf-users@vger.kernel.org, Jean Pihet <j-pihet@ti.com>
Subject: Re: [PATCH 1/3] perf: add calls to suspend trace point
Date: Wed, 5 Jan 2011 11:09:35 +0100 [thread overview]
Message-ID: <AANLkTimRvZs2QBZ4y+AEO7CWUudwBSM6-K0ZQxFTF+Fm@mail.gmail.com> (raw)
In-Reply-To: <201101050001.23979.rjw@sisk.pl>
On Wed, Jan 5, 2011 at 12:01 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Tuesday, January 04, 2011, Jean Pihet wrote:
>> Hi,
>>
>> On Tue, Jan 4, 2011 at 12:29 PM, Pavel Machek <pavel@ucw.cz> wrote:
>> > Hi!
>> >
>> >> Uses the machine_suspend trace point, called from the
>> >> generic kernel suspend_enter function.
>> >>
>> >> Signed-off-by: Jean Pihet <j-pihet@ti.com>
>> >> CC: Thomas Renninger <trenn@suse.de>
>> >> ---
>> >> kernel/power/suspend.c | 3 +++
>> >> 1 files changed, 3 insertions(+), 0 deletions(-)
>> >>
>> >> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
>> >> index ecf7705..0650596 100644
>> >> --- a/kernel/power/suspend.c
>> >> +++ b/kernel/power/suspend.c
>> >> @@ -22,6 +22,7 @@
>> >> #include <linux/mm.h>
>> >> #include <linux/slab.h>
>> >> #include <linux/suspend.h>
>> >> +#include <trace/events/power.h>
>> >>
>> >> #include "power.h"
>> >>
>> >> @@ -164,7 +165,9 @@ static int suspend_enter(suspend_state_t state)
>> >> error = sysdev_suspend(PMSG_SUSPEND);
>> >> if (!error) {
>> >> if (!suspend_test(TEST_CORE) && pm_check_wakeup_events()) {
>> >> + trace_machine_suspend(state);
>> >> error = suspend_ops->enter(state);
>> >> + trace_machine_suspend(PWR_EVENT_EXIT);
>> >> events_check_enabled = false;
>> >> }
>> >> sysdev_resume();
>> >
>> > Ok... why this place?
>> This trace has been placed here because it traces the machine low
>> level mode enter.
>>
>> > I mean, perhaps suspend time should include
>> > device suspend?
>> That makes sense. We have a few options here:
>> 1) keep the traces as proposed to trace the low level machine code only,
>> 2) move the traces to the entry and exit of suspend_enter so that it
>> includes the prepare and late_prepare (+ the associated wake-up)
>> callbacks as well,
>> 3) move the traces to suspend_devices_and_enter so that it includes 2)
>> and the handling of the console and the devices,
>> 4) move the traces to enter_state do that it includes 3), the call to
>> sys_sync and the user space freeze.
>>
>> Note that the the SNAPSHOT_2RAM ioctl code also calls
>> suspend_devices_and_enter, so if only 4) is used no trace will be
>> generated in that case.
>>
>> I am in favor of 3) of 4).
>> What do you think?
>
> Why don't we keep the tracepoints as proposed _and_ add two additional
> tracepoints around device suspend-resume?
I like the idea but that requires to extend the current API with
additional suspend tracepoints or device state change tracepoints.
That can be done once the current API is firmly in place.
Today the only trace API for suspend is machine_suspend(unsigned int
state), so I think the best option is 3) here above.
Unless there is an objection I am pushing 3) asap.
Thanks!
Jean
>
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2011-01-05 10:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 10:17 [PATCH 0/3] perf, tools: new power trace API jean.pihet
2011-01-04 10:17 ` [PATCH 1/3] perf: add calls to suspend trace point jean.pihet
2011-01-04 10:39 ` Ingo Molnar
2011-01-04 10:17 ` [PATCH 2/3] perf: add OMAP support for the new power events jean.pihet
2011-01-04 10:42 ` Ingo Molnar
2011-01-04 10:58 ` Pihet-XID, Jean
2011-01-04 18:03 ` Nishanth Menon
2011-01-05 10:56 ` Jean Pihet
2011-01-04 10:17 ` [PATCH 3/3] tools, perf: Documentation for the power events API jean.pihet
2011-01-04 10:48 ` [PATCH 1/3] perf: add calls to suspend trace point jean.pihet
2011-01-04 11:29 ` Pavel Machek
2011-01-04 15:00 ` Jean Pihet
2011-01-04 23:01 ` Rafael J. Wysocki
2011-01-05 10:09 ` Jean Pihet [this message]
2011-01-05 10:15 ` Rafael J. Wysocki
2011-01-05 11:23 ` Pavel Machek
2011-01-04 10:54 ` [PATCH 2/3] perf: add OMAP support for the new power events jean.pihet
2011-01-04 18:48 ` Paul Walmsley
2011-01-05 11:05 ` Jean Pihet
2011-01-10 14:14 ` Thomas Renninger
2011-01-11 1:24 ` Kevin Hilman
2011-01-10 19:06 ` Paul Walmsley
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=AANLkTimRvZs2QBZ4y+AEO7CWUudwBSM6-K0ZQxFTF+Fm@mail.gmail.com \
--to=jean.pihet@newoldbits.com \
--cc=arjan@linux.intel.com \
--cc=j-pihet@ti.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=trenn@suse.de \
/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).