Skip to content

Commit

Permalink
intel_pstate: skip scheduler hook when in "performance" mode
Browse files Browse the repository at this point in the history
When the governor is set to "performance", intel_pstate does not
need the scheduler hook for doing any calculations.  Under these
conditions, its only purpose is to continue to maintain
cpufreq/scaling_cur_freq.

The cpufreq/scaling_cur_freq sysfs attribute is now provided by
shared x86 cpufreq code on modern x86 systems, including
all systems supported by the intel_pstate driver.

So in "performance" governor mode, the scheduler hook can be skipped.
This applies to both in Software and Hardware P-state control modes.

Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Len Brown authored and Rafael J. Wysocki committed Jun 26, 2017
1 parent 62611cb commit 82b4e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
@@ -2044,10 +2044,10 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
*/
intel_pstate_clear_update_util_hook(policy->cpu);
intel_pstate_max_within_limits(cpu);
} else {
intel_pstate_set_update_util_hook(policy->cpu);
}

intel_pstate_set_update_util_hook(policy->cpu);

if (hwp_active)
intel_pstate_hwp_set(policy->cpu);

0 comments on commit 82b4e03

Please sign in to comment.