All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-trace-users@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Pierre Tardy <tardyp@gmail.com>,
	Jean Pihet <jean.pihet@newoldbits.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Frank Eigler <fche@redhat.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-pm@lists.linux-foundation.org,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Tejun Heo <tj@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	linux-omap@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 2/3] PERF(kernel): Cleanup power events
Date: Mon, 25 Oct 2010 22:29:49 +0200	[thread overview]
Message-ID: <201010252229.50404.rjw__16593.9401406378$1288038703$gmane$org@sisk.pl> (raw)
In-Reply-To: <20101025125844.GB31188@Krystal>

On Monday, October 25, 2010, Mathieu Desnoyers wrote:
> * Ingo Molnar (mingo@elte.hu) wrote:
> > 
> > * Thomas Renninger <trenn@suse.de> wrote:
> > 
> > > On Monday 25 October 2010 12:04:28 Ingo Molnar wrote:
> > > > 
> > > > * Thomas Renninger <trenn@suse.de> wrote:
> > > > 
> > > > > New power trace events:
> > > > > power:processor_idle
> > > > > power:processor_frequency
> > > > > power:machine_suspend
> > > > > 
> > > > > 
> > > > > C-state/idle accounting events:
> > > > >   power:power_start
> > > > >   power:power_end
> > > > > are replaced with:
> > > > >   power:processor_idle
> > > > 
> > > > Well, most power saving hw models (and the code implementing them) have this kind of 
> > > > model:
> > > > 
> > > >  enter power saving mode X
> > > >  exit power saving mode
> > > > 
> > > > Where X is some sort of 'power saving deepness' attribute, right?
> > >
> > > Sure.
> > 
> > Which is is the 'saner' model?
> > 
> > > But ACPI and afaik this model got picked up for PCI and other (sub-)archs as well, 
> > > defines state 0 as the non-power saving mode.
> > 
> > But the actual code does not actually deal with any 'state 0', does it? It enters an 
> > idle function and then exits it, right?
> > 
> > 'power state' might be what is used for devices - but even there, we have:
> > 
> >   - enter power state X
> >   - exit power state
> > 
> > right?
> > 
> > > Same as done here with machine suspend state (S0 is back from suspend) and
> > > this model should get picked up when device sleep states get tracked at
> > > some time.
> > >
> > > It's consistent and applies to some well known specifications.
> > 
> > What we want it to be is for it to be the nicest, most understandable, most logical 
> > model - not one matching random hardware specifications.
> > 
> > ( Hardware specifications only matter in so far that it should be possible to 
> >   express all the known hardware state transitions via these events efficiently. )
> > 
> > > Also tracking processor_idle_{start,end} as a separate event makes no sense and 
> > > there is no need to introduce: processor_idle_start/processor_idle_end 
> > > machine_suspend_start/machine_suspend_end 
> > > device_power_mode_start/device_power_mode_end events.
> > 
> > What do you mean by "makes no sense"?
> > 
> > Are they superfluous? Inefficient? Illogical?
> 
> I think it would require deep understanding of specific power modes of each
> architecture to split into this topology. On the bright side, it would bring
> clear understanding of which HW resource is being put to sleep, which would make
> automated analysis much easier to do. But maybe it's too much pain compared to
> the benefit. The related question is also: where is it best to put this logic ?
> In the kernel code ? In per-arch TRACE_EVENT() handlers or in external trace
> analysis plugins ?
> 
> > 
> > > Using state 0 as "exit/end", is much nicer for kernel/ userspace 
> > > implementations/code and the user.
> > 
> > By that argument we should not have separate fork() and exit() syscalls either, but 
> > a set_process_state(1) and set_process_state(0) interface?
> 
> I'm by no mean expert on power saving hardware specs, but if it is possible for
> hardware to switch between two power saving states without passing through power
> state 0, then using a "set state" rather than an enter/exit would be more
> appropriate; even if we go for a scheme introducing
> 
> processor_idle_start/processor_idle_end,
> machine_suspend_start/machine_suspend_end,
> device_power_mode_start/device_power_mode_end.
> 
> I must defer to you guys to figure out if some hardware actually do that for
> either of CPU idle, suspend or device power modes.

Yes, you can go directly from PCI_D1 to PCI_D2, for one example.

Apart from this, attempting to put system suspend to the same bag as cpuidle
is not going to work in the long run.  They are _fundamentally_ different things
event though the power state we get into as a result of suspend is approximately
the same as we can get into via cpuidle (even in that case the energy savings
will generally be different in both cases due to wakeup events).

Thanks,
Rafael

  parent reply	other threads:[~2010-10-25 20:29 UTC|newest]

Thread overview: 157+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1287488171-25303-1-git-send-email-trenn@suse.de>
2010-10-19 11:36 ` [PATCH 1/3] PERF: Do not export power_frequency, but power_start event Thomas Renninger
2010-10-19 11:36 ` Thomas Renninger
2010-10-19 11:36 ` [PATCH 2/3] PERF(kernel): Cleanup power events Thomas Renninger
2010-10-25  6:54   ` Arjan van de Ven
2010-10-25  6:54   ` Arjan van de Ven
2010-10-25  9:41     ` Thomas Renninger
2010-10-25 13:55       ` Arjan van de Ven
2010-10-25 13:55       ` Arjan van de Ven
2010-10-25 14:36         ` Thomas Renninger
2010-10-25 14:45           ` Arjan van de Ven
2010-10-25 14:45           ` Arjan van de Ven
2010-10-25 14:56             ` Ingo Molnar
2010-10-25 14:56             ` Ingo Molnar
2010-10-25 15:48               ` Thomas Renninger
2010-10-25 16:00                 ` Arjan van de Ven
2010-10-25 23:32                   ` Thomas Renninger
2010-10-25 23:32                   ` Thomas Renninger
2010-10-25 16:00                 ` Arjan van de Ven
2010-10-25 15:48               ` Thomas Renninger
2010-10-25 14:36         ` Thomas Renninger
2010-10-25  9:41     ` Thomas Renninger
2010-10-25  6:58   ` Arjan van de Ven
2010-10-25  6:58   ` Arjan van de Ven
2010-10-25 10:04   ` Ingo Molnar
2010-10-25 10:04   ` Ingo Molnar
2010-10-25 11:03     ` Thomas Renninger
2010-10-25 11:03     ` Thomas Renninger
2010-10-25 11:55       ` Ingo Molnar
2010-10-25 12:55         ` Thomas Renninger
2010-10-25 14:11           ` Arjan van de Ven
2010-10-25 14:11           ` Arjan van de Ven
2010-10-25 14:51             ` Thomas Renninger
2010-10-25 14:51             ` Thomas Renninger
2010-10-25 12:55         ` Thomas Renninger
2010-10-25 12:58         ` Mathieu Desnoyers
2010-10-25 12:58         ` Mathieu Desnoyers
2010-10-25 20:29           ` Rafael J. Wysocki
2010-10-25 20:29           ` Rafael J. Wysocki [this message]
2010-10-25 11:55       ` Ingo Molnar
2010-10-25 13:58       ` Arjan van de Ven
2010-10-25 13:58       ` Arjan van de Ven
2010-10-25 20:33         ` Rafael J. Wysocki
2010-10-25 20:33         ` Rafael J. Wysocki
2010-10-25 23:33   ` [PATCH] PERF(kernel): Cleanup power events V2 Thomas Renninger
2010-10-26  1:09     ` Arjan van de Ven
2010-10-26  1:09     ` Arjan van de Ven
2010-10-26  7:10     ` Ingo Molnar
2010-10-26  7:10     ` Ingo Molnar
2010-10-26  8:08       ` Jean Pihet
2010-10-26 11:21         ` Ingo Molnar
2010-10-26 11:48           ` Thomas Renninger
2010-10-26 11:48           ` Thomas Renninger
2010-10-26 11:54             ` Ingo Molnar
2010-10-26 11:54             ` Ingo Molnar
2010-10-26 13:17               ` Thomas Renninger
2010-10-26 13:35                 ` Thomas Renninger
2010-10-26 13:35                 ` Thomas Renninger
2010-10-26 13:17               ` Thomas Renninger
2010-10-26 18:57             ` Rafael J. Wysocki
2010-10-27  0:00               ` Thomas Renninger
2010-10-27  9:16                 ` Rafael J. Wysocki
2010-10-27  9:16                 ` Rafael J. Wysocki
2010-10-27  0:00               ` Thomas Renninger
2010-10-26 18:57             ` Rafael J. Wysocki
2010-10-26 11:21         ` Ingo Molnar
2010-10-26  8:08       ` Jean Pihet
2010-10-26  9:58       ` Arjan van de Ven
2010-10-26 10:19         ` Ingo Molnar
2010-10-26 10:19         ` Ingo Molnar
2010-10-26  9:58       ` Arjan van de Ven
2010-10-26 10:37       ` Thomas Renninger
2010-10-26 10:37       ` Thomas Renninger
2010-10-26 11:19         ` Ingo Molnar
2010-10-26 11:19         ` Ingo Molnar
2010-10-26 19:01           ` Rafael J. Wysocki
2010-10-26 19:01           ` Rafael J. Wysocki
2010-10-26 15:32       ` Pierre Tardy
2010-10-26 16:04         ` Arjan van de Ven
2010-10-26 16:04         ` Arjan van de Ven
2010-10-26 16:56           ` Pierre Tardy
2010-10-26 17:58             ` Peter Zijlstra
2010-10-26 18:14               ` Mathieu Desnoyers
2010-10-26 18:14               ` Mathieu Desnoyers
2010-10-26 18:50                 ` [linux-pm] " Alan Stern
2010-10-26 21:33                   ` Mathieu Desnoyers
2010-10-26 21:33                   ` [linux-pm] " Mathieu Desnoyers
2010-10-26 22:20                     ` Rafael J. Wysocki
2010-10-26 22:20                     ` [linux-pm] " Rafael J. Wysocki
2010-10-26 22:39                       ` Rafael J. Wysocki
2010-10-26 22:39                       ` [linux-pm] " Rafael J. Wysocki
2010-10-27  0:46                       ` Mathieu Desnoyers
2010-10-27 10:22                         ` Rafael J. Wysocki
2010-10-27 12:21                           ` Mathieu Desnoyers
2010-10-27 14:32                             ` Alan Stern
2010-10-27 14:32                             ` Alan Stern
2010-10-27 14:32                             ` [linux-pm] " Alan Stern
2010-10-28 15:22                               ` Alan Stern
2010-10-28 15:22                               ` [linux-pm] " Alan Stern
2010-10-27 21:43                             ` Rafael J. Wysocki
2010-10-27 21:43                             ` Rafael J. Wysocki
2010-10-27 12:21                           ` Mathieu Desnoyers
2010-10-27 10:22                         ` Rafael J. Wysocki
2010-10-27  0:46                       ` Mathieu Desnoyers
2010-10-26 18:50                 ` Alan Stern
2010-10-26 19:04                 ` Rafael J. Wysocki
2010-10-26 19:04                 ` Rafael J. Wysocki
2010-10-26 21:38                   ` Mathieu Desnoyers
2010-10-26 21:38                   ` Mathieu Desnoyers
2010-10-26 22:22                     ` Rafael J. Wysocki
2010-10-26 22:22                     ` Rafael J. Wysocki
2010-10-26 18:15               ` Pierre Tardy
2010-10-26 19:08                 ` Rafael J. Wysocki
2010-10-26 20:23                   ` Pierre Tardy
2010-10-26 20:23                   ` Pierre Tardy
2010-10-26 20:38                     ` Rafael J. Wysocki
2010-10-26 20:38                     ` Rafael J. Wysocki
2010-10-26 20:52                       ` Arjan van de Ven
2010-10-26 20:52                       ` Arjan van de Ven
2010-10-26 21:17                         ` Rafael J. Wysocki
2010-10-26 21:17                         ` Rafael J. Wysocki
2010-10-26 19:08                 ` Rafael J. Wysocki
2010-10-26 18:15               ` Pierre Tardy
2010-10-26 17:58             ` Peter Zijlstra
2010-10-26 16:56           ` Pierre Tardy
2010-10-26 15:32       ` Pierre Tardy
2010-10-26  7:59     ` Jean Pihet
2010-10-26  7:59     ` Jean Pihet
2010-10-26 18:52     ` Rafael J. Wysocki
2010-10-26 18:52     ` Rafael J. Wysocki
2010-10-25 23:33   ` Thomas Renninger
2010-10-19 11:36 ` [PATCH 2/3] PERF(kernel): Cleanup power events Thomas Renninger
2010-10-19 11:36 ` [PATCH 3/3] PERF(userspace): Adjust perf timechart to the new " Thomas Renninger
2010-10-19 11:36 ` Thomas Renninger
2010-10-26  0:18   ` [PATCH] PERF(userspace): Adjust perf timechart to the new power events V2 Thomas Renninger
2010-10-26  0:18   ` Thomas Renninger
2010-10-28  9:02 Cleanup and enhance power trace events Thomas Renninger
2010-10-28  9:02 ` [PATCH 2/3] PERF(kernel): Cleanup power events Thomas Renninger
2010-10-28 11:17   ` Rafael J. Wysocki
2010-10-28 11:17   ` Rafael J. Wysocki
2010-10-28 11:31     ` Rafael J. Wysocki
2010-10-28 11:31     ` [linux-pm] " Rafael J. Wysocki
2010-10-28 11:37       ` Thomas Renninger
2010-10-28 11:37       ` Thomas Renninger
2010-10-28  9:02 ` Thomas Renninger
2010-11-11 18:03 [RESEND] Power trace event cleanup by still providing old interface for some time Thomas Renninger
2010-11-11 18:03 ` [PATCH 2/3] PERF(kernel): Cleanup power events Thomas Renninger
2010-11-12 14:20   ` Jean Pihet
2010-11-12 18:17     ` Thomas Renninger
2010-11-12 21:50       ` Jean Pihet
2010-11-14 13:34         ` Thomas Renninger
2010-11-18  8:01           ` Ingo Molnar
2010-11-18  9:27             ` Thomas Renninger
2010-11-18  9:36               ` Ingo Molnar
2010-11-18  9:44                 ` Jean Pihet
2010-11-18 10:52                 ` Ingo Molnar
2010-11-18 16:34                   ` Jean Pihet
2010-11-19  0:14                     ` Thomas Renninger
2010-11-14 13:22   ` Thomas Renninger
2010-11-15 15:49     ` Jean Pihet
2010-11-18 13:01 Power trace event cleanup by still providing old interface for some time Thomas Renninger
2010-11-18 13:01 ` [PATCH 2/3] PERF(kernel): Cleanup power events Thomas Renninger

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='201010252229.50404.rjw__16593.9401406378$1288038703$gmane$org@sisk.pl' \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jean.pihet@newoldbits.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tardyp@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.