public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Konstantin Krivyakin <k.krivyakin@samsung.com>
Cc: linux-kernel@vger.kernel.org, rjw@sisk.pl,
	viresh.kumar@linaro.org, mingo@redhat.com, kgene.kim@samsung.com,
	linux-pm@vger.kernel.org, i.zhbanov@samsung.com,
	e.voevodin@samsung.com, kyungmin.park@samsung.com,
	akpm@linux-foundation.org
Subject: Re: [PATCH RFC 0/3] Per-process power consumption measurement facility
Date: Tue, 30 Jul 2013 10:52:56 +0200	[thread overview]
Message-ID: <20130730085256.GK3008@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1375172259-9641-1-git-send-email-k.krivyakin@samsung.com>

On Tue, Jul 30, 2013 at 12:17:36PM +0400, Konstantin Krivyakin wrote:
> This patchset adds per-process power consumption measurement facility.
> Power consumption is very important on mobile platforms. This code
> allows to measure consumed power in Watts*Hours. The consumed power
> for process is updated on scheduler switch and depends on current
> CPU voltage and frequency.
> 
> The formula for computation is: P = C * V^2 * f, where C is a constant
> that reflects capacity of the system, V is the current voltage and
> f is the current frequency.
> (Taken from: http://en.wikipedia.org/wiki/CPU_power_dissipation).
> 
> In this patchset was added implementation for Exynos platform
> to demonstrate how it works.
> 
> To minimize scheduler impact for each CPU P-state the value of (V^2 *f)
> was precomputed at the time of platform initialization.

It seems to me the 3 multiplies that takes could be done when cpufreq
actually changes the P-state.

> And to reduce performance impact furthermore, the C constant is multiplied
> in userspace.

That seems particularly silly; how is userspace to know C and why
isn't it a much better idea to do this in the code generating the number
for userspace to consume.

Also, I intensely dislike this thing because:

 - it adds more user interface
 - it adds more accounting muck
 - it completely lacks any useful changelogs
 - it completely fails to even begin addressing the issues we already
   have with cpufreq

There's been a lot of talk about power aware scheduling in the recent
past, there's also been a lot of problems listed we must overcome/solve.
This patch set completely fails to tie into any of that.

You also completely fail to explain the user case and thus related why
you can't use any of the other facilities like perf or ftrace to measure
this.

  parent reply	other threads:[~2013-07-30  8:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  8:17 [PATCH RFC 0/3] Per-process power consumption measurement facility Konstantin Krivyakin
2013-07-30  8:17 ` [PATCH RFC 1/3] Add interface to receive current cpu power Konstantin Krivyakin
2013-07-30  8:17 ` [PATCH RFC 2/3] Add power consumption counter in task_struct Konstantin Krivyakin
2013-07-30  8:17 ` [PATCH RFC 3/3] Update current cpu power when cpu freq change for exynos Konstantin Krivyakin
2013-07-30  8:52 ` Peter Zijlstra [this message]
2013-07-30 12:10   ` [PATCH RFC 0/3] Per-process power consumption measurement facility Igor Zhbanov
2013-07-30 13:31   ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2013-07-04 15:17 Konstantin Krivyakin
2013-07-05  0:48 ` Kyungmin Park

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=20130730085256.GK3008@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=e.voevodin@samsung.com \
    --cc=i.zhbanov@samsung.com \
    --cc=k.krivyakin@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=viresh.kumar@linaro.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