]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 6 Sep 2025 13:12:23 +0000 (09:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:29 +0000 (18:56 +0200)
commit83440514ef2add4def20278340e6af64ddd3efd0
tree6bc6963efe4b82963b98528b49a5b03f1f40e440
parent86cade7791a2160ced1b89db3796b0b1c2ce0e88
cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization

[ Upstream commit 0940f1a8011fd69be5082015068e0dc31c800c20 ]

The global.turbo_disabled is updated quite often, especially in the
passive mode in which case it is updated every time the scheduler calls
into the driver.  However, this is generally not necessary and it adds
MSR read overhead to scheduler code paths (and that particular MSR is
slow to read).

For this reason, make the driver read MSR_IA32_MISC_ENABLE_TURBO_DISABLE
just once at the cpufreq driver registration time and remove all of the
in-flight updates of global.turbo_disabled.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Stable-dep-of: ac4e04d9e378 ("cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/intel_pstate.c