Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: intel: Remove explicit user_space governor selection

Currently some user space programs like Linux thermald needs to register
to get notifications from both thermal user space governor and also
Thermal netlink. This is required as some messages like HFI (Hardware
Feedback Notifications) requires Thermal netlink.

This results in additional processing in kernel and user space to process
both notifications. The cost of using user space governor using
kobject_uevent is much higher as this is also used by other user space
daemons like udev daemon.

Do not select user_space thermal governor by default. If it is present
user space programs can always use this governor by writing to
"policy" attribute.

Instead from the kernel select THERMAL_NETLINK. Trip temperature
violation can be received by user space programs via thermal netlink
events:
THERMAL_GENL_EVENT_TZ_TRIP_UP
THERMAL_GENL_EVENT_TZ_TRIP_DOWN

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20241216190821.1137162-1-srinivas.pandruvada@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Srinivas Pandruvada and committed by
Rafael J. Wysocki
4596cbea 3fd3697e

+2 -5
+1 -1
drivers/thermal/intel/Kconfig
··· 22 22 config X86_PKG_TEMP_THERMAL 23 23 tristate "X86 package temperature thermal driver" 24 24 depends on X86_THERMAL_VECTOR 25 - select THERMAL_GOV_USER_SPACE 25 + select THERMAL_NETLINK 26 26 select INTEL_TCC 27 27 default m 28 28 help
+1 -1
drivers/thermal/intel/int340x_thermal/Kconfig
··· 6 6 config INT340X_THERMAL 7 7 tristate "ACPI INT340X thermal drivers" 8 8 depends on X86_64 && ACPI && PCI 9 - select THERMAL_GOV_USER_SPACE 9 + select THERMAL_NETLINK 10 10 select ACPI_THERMAL_REL 11 11 select ACPI_FAN 12 12 select ACPI_THERMAL_LIB
-1
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
··· 521 521 }; 522 522 523 523 static struct thermal_zone_params int3400_thermal_params = { 524 - .governor_name = "user_space", 525 524 .no_hwmon = true, 526 525 }; 527 526
-1
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
··· 105 105 } 106 106 107 107 static struct thermal_zone_params int340x_thermal_params = { 108 - .governor_name = "user_space", 109 108 .no_hwmon = true, 110 109 }; 111 110
-1
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
··· 272 272 }; 273 273 274 274 static struct thermal_zone_params tzone_params = { 275 - .governor_name = "user_space", 276 275 .no_hwmon = true, 277 276 }; 278 277