hwmon: (coretemp) Report power and energy consumption
Guenter Roeck
maintainerPATCH v2 2/2 hwmon: (coretemp) Report power and energy consumption
Supported by SandyBridge and newer CPUs.
Cc Fenghua Yu <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
---
v2:
- Report graphics and DRAM domain power (if supported) in addition to package and core domain power
- Add support for suspend and resume
- Do not report powerX_cap_min and powerX_cap_max as it was misleading and did not really report valid ranges for powerX_cap
- Only report powerX_cap if enabled
- Only report powerX_max for package power
- When calculating power in periodic function, take into account that measurements might not be exactly one second apart
Documentation/hwmon/coretemp | 16 ++ drivers/hwmon/coretemp.c | 378 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 372 insertions(+), 22 deletions(-)
Documentation/hwmon/coretemp +16 -0
@@ -43,6 +43,22 @@ tempX_crit_alarm - Set when Out-of-spec bit is set, never clears. tempX_label - Contains string "Core X", where X is processor number. For Package temp, this will be "Physical id Y", where Y is the package number. +energy1_input - Package energy consumption since driver was loaded +power1_cap - Package power limit +power1_input - Package power consumption +power1_max - Maximum package power +energy2_input - Cores energy consumption since driver was loaded +power2_cap - Cores power limit +power2_input - Cores power consumption +energy3_input - Graphics domain energy consumption since driver was loaded +power3_cap - Graphics domain power limit +power3_input - Graphics domain power consumption +energy4_input - DRAM domain energy consumption since driver was loaded +power4_cap - DRAM domain power limit +power4_input - DRAM domain power consumption + +Graphics and DRAM power domains are not supported on all chip variants. +powerX_cap is only reported if enabled. On CPU models which support it, TjMax is read from a model-specific register. On other models, it is set to an arbitrary value based on weak heuristics.
drivers/hwmon/coretemp.c +355 -22
505 lines not on this page · raw message
Signature · 7 lines
1.7.9.7 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors