Skip to content

Adds cpu power accounting per-pid basis.

Ruchi Kandoi linux-pm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesIn review
  2. v12 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_statedrivers/cpufreq/cpufreq_stats.c+161 -23 replies
2/2sched: cpufreq: Adds a field cpu_power in the task_structdrivers/cpufreq/cpufreq_stats.c include/linux/cpufreq.h include/linux/sched.h +2 more+46 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

These patches add a mechanism which will accurately caculate the CPU power used by all the processes in the system. In order to account for the power used by all the processes a data field "cpu_power" has been added in the task_struct. This field adds power for both the system as well as user time. cpu_power contains the total amount of charge(in uAmsec units) used by the process. This model takes into account the frequency at which the process was running(i.e higher power for processes running at higher frequencies). It requires the cpufreq_stats module to be initialized with the current numbers for each of the CPU core at each frequency. This will be initialized during init time.

Ruchi Kandoi (2):
cpufreq_stats: Adds sysfs file
/sys/devices/system/cpu/cpufreq/current_in_state
sched: cpufreq: Adds a field cpu_power in the task_struct

 drivers/cpufreq/cpufreq_stats.c | 191 +++++++++++++++++++++++++++++++++++++++-
 include/linux/cpufreq.h         |   8 ++
 include/linux/sched.h           |   2 +
 kernel/fork.c                   |   1 +
 kernel/sched/cputime.c          |   7 ++
 5 files changed, 207 insertions(+), 2 deletions(-)
Signature · 1 line
2.2.0.rc0.207.ga3a616c