]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
thermal: intel: Remove explicit user_space governor selection
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 16 Dec 2024 19:08:21 +0000 (11:08 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Dec 2024 19:40:22 +0000 (20:40 +0100)
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>
drivers/thermal/intel/Kconfig
drivers/thermal/intel/int340x_thermal/Kconfig
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

index a31f2f32996afd712cba2836017e36889b09f655..9c0f66f9defc1483fb484f7d56a89c5685d39b27 100644 (file)
@@ -22,7 +22,7 @@ config INTEL_TCC
 config X86_PKG_TEMP_THERMAL
        tristate "X86 package temperature thermal driver"
        depends on X86_THERMAL_VECTOR
-       select THERMAL_GOV_USER_SPACE
+       select THERMAL_NETLINK
        select INTEL_TCC
        default m
        help
index e76b13e44d03fa896132e5d065db873a88efb588..d9a74424c29db695bd51813ee0d53f64e15a399f 100644 (file)
@@ -6,7 +6,7 @@
 config INT340X_THERMAL
        tristate "ACPI INT340X thermal drivers"
        depends on X86_64 && ACPI && PCI
-       select THERMAL_GOV_USER_SPACE
+       select THERMAL_NETLINK
        select ACPI_THERMAL_REL
        select ACPI_FAN
        select ACPI_THERMAL_LIB
index 5805e08d71be73193f33f4adbbfd33f7d7a27bc9..0e07693ecf59e29495be1ed68d39922de40f6d7c 100644 (file)
@@ -521,7 +521,6 @@ static struct thermal_zone_device_ops int3400_thermal_ops = {
 };
 
 static struct thermal_zone_params int3400_thermal_params = {
-       .governor_name = "user_space",
        .no_hwmon = true,
 };
 
index 31ed338eb83c09bcee3dc8562f7527aca4223a8a..8dca6a6aceca144700bea2837d8506ae57349667 100644 (file)
@@ -105,7 +105,6 @@ static int int340x_thermal_read_trips(struct acpi_device *zone_adev,
 }
 
 static struct thermal_zone_params int340x_thermal_params = {
-       .governor_name = "user_space",
        .no_hwmon = true,
 };
 
index 707bd1b23823ca7544cb61e04be4dda533100a22..7e37fd23b23c77e14e808413532aaae1a087983f 100644 (file)
@@ -272,7 +272,6 @@ static const struct thermal_zone_device_ops tzone_ops = {
 };
 
 static struct thermal_zone_params tzone_params = {
-       .governor_name = "user_space",
        .no_hwmon = true,
 };