diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2022-12-16 23:24:08 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-02-03 18:30:09 +0300 |
commit | 0f8b916bc5b5d74cacef2b616b04db10633b8105 (patch) | |
tree | 06f874f195c18b6f84a572623ca88143f094f7d5 /drivers/hwmon | |
parent | e247510e1baad04e9b7b8ed7190dbb00989387b9 (diff) | |
download | linux-0f8b916bc5b5d74cacef2b616b04db10633b8105.tar.xz |
hwmon: (coretemp) avoid RDMSR interrupts to isolated CPUs
The coretemp driver uses rdmsr_on_cpu calls to read
MSR_IA32_PACKAGE_THERM_STATUS/MSR_IA32_THERM_STATUS registers,
which contain information about current core temperature.
For certain low latency applications, the RDMSR interruption exceeds
the applications requirements.
So do not create core files in sysfs, for CPUs which have
isolation and nohz_full enabled.
Temperature information from the housekeeping cores should be
sufficient to infer die temperature.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Link: https://lore.kernel.org/r/Y5zT6B1mY9/pnwJV@tpad
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/coretemp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index ca7a9b373bbd..49091ea9f7b7 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -27,6 +27,7 @@ #include <asm/msr.h> #include <asm/processor.h> #include <asm/cpu_device_id.h> +#include <linux/sched/isolation.h> #define DRVNAME "coretemp" @@ -502,6 +503,9 @@ static int create_core_data(struct platform_device *pdev, unsigned int cpu, u32 eax, edx; int err, index, attr_no; + if (!housekeeping_cpu(cpu, HK_TYPE_MISC)) + return 0; + /* * Find attr number for sysfs: * We map the attr number to core id of the CPU |