linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] Per-process power consumption measurement facility
@ 2013-07-04 15:17 Konstantin Krivyakin
  2013-07-04 15:17 ` [PATCH RFC 1/3] Add interface to receive current cpu power Konstantin Krivyakin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Konstantin Krivyakin @ 2013-07-04 15:17 UTC (permalink / raw)
  To: k.krivyakin, i.zhbanov, e.voevodin, kyungmin.park, linux-kernel

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.

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

Konstantin Krivyakin (3):
  Add interface to receive current cpu power
  Add power consumption counter in task_struct.
  Update current cpu power when cpu freq change for exynos.

 drivers/cpufreq/cpufreq.c            |   17 +++++++++++++++++
 drivers/cpufreq/exynos-cpufreq.c     |    2 ++
 drivers/cpufreq/exynos-cpufreq.h     |    1 +
 drivers/cpufreq/exynos4x12-cpufreq.c |   19 ++++++++++++++++++-
 include/linux/cpufreq.h              |    6 ++++++
 include/linux/sched.h                |    2 ++
 include/uapi/linux/taskstats.h       |    2 ++
 kernel/fork.c                        |    1 +
 kernel/sched/core.c                  |    8 ++++++++
 kernel/sched/cputime.c               |   11 +++++++++++
 kernel/tsacct.c                      |    3 +++
 11 files changed, 71 insertions(+), 1 deletion(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH RFC 0/3] Per-process power consumption measurement facility
@ 2013-07-30  8:17 Konstantin Krivyakin
  2013-07-30  8:17 ` [PATCH RFC 1/3] Add interface to receive current cpu power Konstantin Krivyakin
  0 siblings, 1 reply; 9+ messages in thread
From: Konstantin Krivyakin @ 2013-07-30  8:17 UTC (permalink / raw)
  To: linux-kernel, rjw, viresh.kumar, mingo, peterz, kgene.kim, linux-pm
  Cc: k.krivyakin, i.zhbanov, e.voevodin, kyungmin.park, akpm

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.

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

Konstantin Krivyakin (3):
  Add interface to receive current cpu power
  Add power consumption counter in task_struct.
  Update current cpu power when cpu freq change for exynos.

 drivers/cpufreq/cpufreq.c            |   17 +++++++++++++++++
 drivers/cpufreq/exynos-cpufreq.c     |    2 ++
 drivers/cpufreq/exynos-cpufreq.h     |    1 +
 drivers/cpufreq/exynos4x12-cpufreq.c |   19 ++++++++++++++++++-
 include/linux/cpufreq.h              |    6 ++++++
 include/linux/sched.h                |    2 ++
 include/uapi/linux/taskstats.h       |    2 ++
 kernel/fork.c                        |    1 +
 kernel/sched/core.c                  |    8 ++++++++
 kernel/sched/cputime.c               |   11 +++++++++++
 kernel/tsacct.c                      |    3 +++
 11 files changed, 71 insertions(+), 1 deletion(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-30  8:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04 15:17 [PATCH RFC 0/3] Per-process power consumption measurement facility Konstantin Krivyakin
2013-07-04 15:17 ` [PATCH RFC 1/3] Add interface to receive current cpu power Konstantin Krivyakin
2013-07-05  0:49   ` Kyungmin Park
2013-07-04 15:17 ` [PATCH RFC 2/3] Add power consumption counter in task_struct Konstantin Krivyakin
2013-07-05  0:50   ` Kyungmin Park
2013-07-04 15:17 ` [PATCH RFC 3/3] Update current cpu power when cpu freq change for exynos Konstantin Krivyakin
2013-07-05  0:51   ` Kyungmin Park
2013-07-05  0:48 ` [PATCH RFC 0/3] Per-process power consumption measurement facility Kyungmin Park
2013-07-30  8:17 Konstantin Krivyakin
2013-07-30  8:17 ` [PATCH RFC 1/3] Add interface to receive current cpu power Konstantin Krivyakin

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).