From: Thomas Renninger <trenn@suse.de>
To: Jean Pihet <jean.pihet@newoldbits.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Arjan van de Ven <arjan@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Len Brown <len.brown@intel.com>,
arjan@infradead.org, Kevin Hilman <khilman@deeprootsystems.com>,
linux-kernel@vger.kernel.org, discuss@lesswatts.org,
linux-pm@lists.linux-foundation.org, linux-omap@vger.kernel.org,
linux-perf-users@vger.kernel.org,
linux-trace-users@vger.kernel.org
Subject: Re: [PATCH] tracing, perf: add more power related events
Date: Fri, 17 Sep 2010 15:08:45 +0200 [thread overview]
Message-ID: <201009171508.46471.trenn@suse.de> (raw)
In-Reply-To: <AANLkTimCy8pB6JZ2bkGutTou8-oXc1yjweqCxVrLw=Kk@mail.gmail.com>
Hi,
I had a quick look at this and it's amazing how broken
the whole power event tracing interfaces are.
It's not your fault, Jean, they always were and adding your stuff is
fine.
Some questions, maybe I've overseen something:
Why does this event:
DEFINE_EVENT(power, power_frequency,
exist and takes a C-/P-state, now also an S-state type as argument?
It should be named more generic, like:
DEFINE_EVENT(power, power_switch,
then it could get invoked when any P-/C-/S-/X- state
switch happened.
What kind of hack is this:
TRACE_EVENT(power_end,
showing up as:
power_end: dummy=65535
What ends here?
I know it's a workaround/hack for userspace apps to be
able to detect leaving of a sleep state, but how would someone
know or how would someone describe this in a proper API documentation?
Apropos documentation..., are the power trace events documented
somewhere?
At least the state should still be passed, then the _start/_end thing
can be reused by something else than C-states.
I can't see the use of having _start/_end events at all.
You are always in a state, having one:
power_switch
as suggested above, is enough to track everything.
Examples:
Today's C-state tracking:
power_start: type=1 state=1 -> C1 entered
power_end: dummy=65535 -> C-state left
power_start: type=1 state=2 -> C2 entered
power_end: dummy=65535 -> C-state left
would then be:
power_switch: type=1 state=1 -> C1 entered
power_switch: type=1 state=0 -> C0 entered -> means C1 left...
power_switch: type=1 state=2 -> C2 entered
power_switch: type=1 state=0 -> C0 entered -> means C2 left...
...
Todays P-state tracking:
power_frequency: type=2 state=125000000 -> P-state change to 125 MHz
power_frequency: type=2 state=90000000 -> P-state change to 90 MHz
would then be:
power_switch: type=2 state=125000000 -> P-state change to 125 MHz
power_switch: type=2 state=90000000 -> P-state change to 90 MHz
The S-state and T-state tracking would fit into that without
modification.
Thinking one step further, a possibility to track D-states would
need an additional field, a pointer to the device, best a sysfs path
or similar.
Jean, I do not think tracing the S-state with power_start is a
good idea. Best would be the power_frequency gets renamed (yes, breaks
userspace, but those have to be adjusted) and used for P- and S-
state tracking (and C-state tracking as well, but this would need
additional userspace modifications).
How do you track when the S-states end?
Thomas
next prev parent reply other threads:[~2010-09-17 13:08 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 7:21 [PATCH] tracing, perf: add more power related events Jean Pihet
2010-09-07 8:01 ` Jean Pihet
2010-09-08 6:53 ` Ingo Molnar
2010-09-09 7:15 ` Jean Pihet
2010-09-09 7:54 ` Ingo Molnar
2010-09-15 15:45 ` Jean Pihet
2010-09-17 13:08 ` Thomas Renninger [this message]
2010-09-17 14:05 ` Jean Pihet
2010-09-17 14:24 ` Ingo Molnar
2010-09-17 15:36 ` Thomas Renninger
2010-09-17 16:24 ` Ingo Molnar
2010-09-17 22:26 ` Thomas Renninger
2010-09-22 15:31 ` Jean Pihet
2010-09-22 15:33 ` Arjan van de Ven
2010-09-22 15:36 ` Jean Pihet
2010-09-22 16:32 ` Arjan van de Ven
2010-09-22 16:43 ` Peter Zijlstra
2010-09-22 17:06 ` Arjan van de Ven
2010-09-22 17:30 ` Peter Zijlstra
2010-09-22 18:15 ` Steven Rostedt
2010-09-22 18:23 ` Ingo Molnar
2010-09-22 18:30 ` Peter Zijlstra
2010-09-22 18:26 ` Peter Zijlstra
2010-09-22 18:36 ` Steven Rostedt
2010-09-22 18:43 ` Peter Zijlstra
2010-09-22 19:14 ` Frank Ch. Eigler
2010-09-22 17:36 ` Thomas Renninger
2010-09-22 16:47 ` Peter Zijlstra
2010-09-22 17:57 ` Thomas Renninger
2010-09-22 18:13 ` Arjan van de Ven
2010-09-22 18:34 ` Thomas Renninger
2010-09-22 18:09 ` Rafael J. Wysocki
2010-09-22 18:49 ` Rafael J. Wysocki
2010-09-28 8:35 ` Jean Pihet
2010-09-28 21:22 ` Rafael J. Wysocki
2010-09-28 21:43 ` Jean Pihet
2010-09-28 22:05 ` Rafael J. Wysocki
2010-09-28 21:45 ` Arjan van de Ven
2010-09-28 22:05 ` Rafael J. Wysocki
2010-09-29 7:49 ` Thomas Renninger
2010-09-29 9:25 ` Jean Pihet
2010-10-04 17:55 ` [linux-pm] " Pavel Machek
2010-09-17 15:29 ` Thomas Renninger
2010-09-17 21:58 ` Thomas Renninger
2010-09-17 22:04 ` Thomas Renninger
2010-09-17 22:10 ` Thomas Renninger
2010-09-17 22:17 ` Thomas Renninger
2010-09-17 8:28 ` [tip:perf/core] tracing, perf: Add " tip-bot for Jean Pihet
-- strict thread matches above, loose matches on Subject: below --
2010-08-16 11:09 [PATCH] tracing, perf: add " Jean Pihet
2010-08-16 11:15 ` Peter Zijlstra
2010-08-16 11:25 ` Jean Pihet
2010-08-23 10:25 ` Jean Pihet
2010-09-03 17:00 ` Jean Pihet
2010-09-03 18:05 ` Thomas Renninger
2010-09-03 19:55 ` Ingo Molnar
2010-09-03 20:10 ` Thomas Renninger
2010-09-03 20:28 ` Ingo Molnar
2010-09-03 22:56 ` Arjan van de Ven
2010-09-04 8:18 ` Ingo Molnar
2010-09-06 8:56 ` Jean Pihet
2010-09-06 10:42 ` Thomas Renninger
2010-09-06 11:27 ` Jean Pihet
2010-09-06 12:00 ` Thomas Renninger
2010-09-07 7:28 ` Jean Pihet
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=201009171508.46471.trenn@suse.de \
--to=trenn@suse.de \
--cc=arjan@infradead.org \
--cc=arjan@linux.intel.com \
--cc=discuss@lesswatts.org \
--cc=jean.pihet@newoldbits.com \
--cc=khilman@deeprootsystems.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=linux-trace-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/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