Skip to content

Commit 255ebf2

Browse files
committed
cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode
JIRA: https://issues.redhat.com/browse/RHEL-112493 commit 1cefe49 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon Jun 16 20:19:19 2025 +0200 cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode In the passive mode, intel_cpufreq_update_pstate() sets HWP_MIN_PERF in accordance with the target frequency to ensure delivering adequate performance, but it sets HWP_DESIRED_PERF to 0, so the processor has no indication that the desired performance level is actually equal to the floor one. This may cause it to choose a performance point way above the desired level. Moreover, this is inconsistent with intel_cpufreq_adjust_perf() which actually sets HWP_DESIRED_PERF in accordance with the target performance value. Address this by adjusting intel_cpufreq_update_pstate() to pass target_pstate as both the minimum and the desired performance levels to intel_cpufreq_hwp_update(). Fixes: a365ab6 ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Shashank Balaji <shashank.mahadasyam@sony.com> Link: https://patch.msgid.link/6173276.lOV4Wx5bFT@rjwysocki.net Signed-off-by: David Arcari <darcari@redhat.com>
1 parent dcc1666 commit 255ebf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,8 +3261,8 @@ static int intel_cpufreq_update_pstate(struct cpufreq_policy *policy,
32613261
int max_pstate = policy->strict_target ?
32623262
target_pstate : cpu->max_perf_ratio;
32633263

3264-
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate, 0,
3265-
fast_switch);
3264+
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate,
3265+
target_pstate, fast_switch);
32663266
} else if (target_pstate != old_pstate) {
32673267
intel_cpufreq_perf_ctl_update(cpu, target_pstate, fast_switch);
32683268
}

0 commit comments

Comments
 (0)