Skip to content

RFC cpufreq: Allow drivers to receive more information from the governor

Rafael J. Wysocki linux-pm lkml 1 version In review

Get series with b4
b4 am 1817571.2o5Kk4Ohv2@kreacher

Versions newest first

  1. v1 RFC Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpufreq: Add special-purpose fast-switching callback for driversdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h include/linux/sched/cpufreq.h +1 more+88 -126 replies
2/2cpufreq: intel_pstate: Implement the ->adjust_perf() callbackdrivers/cpufreq/intel_pstate.c+65 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/2] cpufreq: Allow drivers to receive more information from the governor

Hi,

Using intel_pstate in the passive mode with HWP enabled, in particular under the schedutil governor, is still kind of problematic, because it has to assume that it should not allow the frequency to fall below the one requested by the governor. For this reason, it translates the target frequency into HWP.REQ.MIN which generally causes the processor to run a bit too fast.

Moreover, this allows the HWP algorithm to use any frequency between the target one and HWP.REQ.MAX that corresponds to the policy max limit and some workloads cause it to go for the max turbo frequency prematurely which hurts energy- efficiency without improving performance, even though the schedutil governor itself would not allow the frequency to ramp up so fast.

This patch series attempts to improve the situation by introducing a new driver callback allowing the driver to receive more information from the governor. In particular, this allows the min (required) and target (desired) performance levels to be passed to it and those can be used to give better hints to the hardware.

Patch [1/2] updates the core and the schedutil governor and patch [2/2] modifies intel_pstate to use the new callback when appropriate.

Please refer to the patch changelogs for details.

Thanks!