linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] CPU Package temperarure thermal driver (v02)
@ 2013-05-17 23:42 Srinivas Pandruvada
  2013-05-17 23:42 ` [PATCH 1/3] x86, mcheck, therm_throt: Process package thresholds Srinivas Pandruvada
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Srinivas Pandruvada @ 2013-05-17 23:42 UTC (permalink / raw)
  To: linux-pm
  Cc: eduardo.valentin, rui.zhang, tony.luck, linux-edac, Srinivas Pandruvada

This driver register CPU digital temperature package level sensor as a
thermal zone with two user mode configurable trip points. Once
the trip point is violated, user mode can receive notification via thermal
notification mechanism and can take any action to control temperature.

Changes:
v02:
Did majority of changes suggested by Eduardo Valentin. Main changes are:
- Module parameters for rate control delay
- Removed user space gov parameter in thermal_zone_register
- Changes related to returning of errors values
- Error code return values

v01:
First version for review

Background:
This set of changes were done to coretemp driver and posted to lm_sensors
mailing list on 04/04/2013. This was reviewed by Guenter Roeck from lm-sensors
and Zhang Rui (thermal maintainer). They were in agreement not to add notification
mechanism to coretemp driver but use thermal sysfs.
Guenter Roeck suggested to use approach like "db8500_thermal driver in drivers/thermal".
So resubmitting the driver as a thermal zone driver.
Previous discussion link:
http://comments.gmane.org/gmane.linux.drivers.sensors/32182
" 
This is clear that there is reluctance in adding thresholds in coretemp sysfs,
during previous attempts. Probably because of lake of use cases.
But this time use case may be more compelling.

We have many small form factor devices like ultrabooks, slate PCs in the market.
Unfortunately these devices reach maximum temperature with relatively less
workloads, causing BIOS to do thermal throttling. There are real performance
issues due to aggressive BIOS action to control thermals and also thermal breakdown
in some cases.

Even the most expensive laptops, don't have correct ACPI thermal configuration,
so that kernel thermal driver can act. In some case even the trip point is higher
than critical temperature setting.

Intel has developed several drivers, which can be used to cool the system very efficiently.
They include RAPL based cooling driver, Powerclamp driver and P state driver.
To utilize these cooling device a closed loop user mode program is required, which
will utilize these method and dynamically compensate for high CPU temperatures,
without relying on any configuration data.
One such solution is developed is "Linux thermal daemon". More details can be
obtained from 
"https://github.com/01org/thermal_daemon/blob/master/ThermalDaemon_Introduction.pdf".
This daemon polls for cpu temperature and apply compensation once the CPU reach target
temperature. 

This polling can be mostly avoided, by getting notification for the temperature, where
it needs to wake up and get ready for apply compensation. In most of the normal use 
cases, there may not be any threshold events. So very minimal number of user space
notification for thermal thresholds.

Srinivas Pandruvada (3):
  x86, mcheck, therm_throt: Process package thresholds
  Thermal: CPU Package temperature thermal
  Thermal: Documentation for x86 package temperature thermal driver

 Documentation/thermal/x86_pkg_temperature_thermal |  47 ++
 arch/x86/include/asm/mce.h                        |   7 +
 arch/x86/kernel/cpu/mcheck/therm_throt.c          |  63 ++-
 drivers/thermal/Kconfig                           |  12 +
 drivers/thermal/Makefile                          |   2 +-
 drivers/thermal/x86_pkg_temp_thermal.c            | 642 ++++++++++++++++++++++
 6 files changed, 768 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/thermal/x86_pkg_temperature_thermal
 create mode 100644 drivers/thermal/x86_pkg_temp_thermal.c

-- 
1.7.11.7


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

end of thread, other threads:[~2013-06-13  2:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 23:42 [PATCH 0/3] CPU Package temperarure thermal driver (v02) Srinivas Pandruvada
2013-05-17 23:42 ` [PATCH 1/3] x86, mcheck, therm_throt: Process package thresholds Srinivas Pandruvada
2013-05-17 23:42 ` [PATCH 2/3] Thermal: CPU Package temperature thermal Srinivas Pandruvada
2013-05-17 23:42 ` [PATCH 3/3] Thermal: Documentation for x86 package temperature thermal driver Srinivas Pandruvada
2013-05-28  2:38 ` [PATCH 0/3] CPU Package temperarure thermal driver (v02) Zhang Rui
2013-05-28 15:17   ` Srinivas Pandruvada
2013-05-28 15:56     ` Tony Luck
2013-05-28 18:26       ` Srinivas Pandruvada
2013-06-13  2:17 ` Zhang Rui

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