Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 11bf0d78 authored by Huang Rui's avatar Huang Rui Committed by Guenter Roeck
Browse files

hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm


This patch introduces an algorithm that computes the average power by
reading a delta value of “core power accumulator” register during
measurement interval, and then dividing delta value by the length of
the time interval.

User is able to use power1_average entry to measure the processor power
consumption and power1_average_interval entry to set the interval.

A simple example:

ray@hr-ub:~/tip$ sensors
fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       19.58 mW (avg =   2.55 mW, interval =   0.01 s)
                       (crit =  15.00 W)

...

The result is current average processor power consumption in 10
millisecond. The unit of the result is uWatt.

Suggested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent cdb9e110
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment