Skip to content

cpufreq: Allow drivers to receive more information from the governor

Rafael J. Wysocki linux-pm lkml 2 versions – In review

Get series with b4
b4 am 3827230.0GnL3RTcl1@kreacher

Versions newest first · linked by author and title

  1. v2 Latest3 patches 8 repliesIn review
  2. v14 patches 17 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cpufreq: schedutil: Add util to struct sg_cpukernel/sched/cpufreq_schedutil.c+20 -220 replies
2/3cpufreq: Add special-purpose fast-switching callback for driversdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h include/linux/sched/cpufreq.h +1 more+117 -100 replies
3/3cpufreq: intel_pstate: Implement the ->adjust_perf() callbackdrivers/cpufreq/intel_pstate.c+58 -121 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchViresh KumarSrinivas Pandruvada
SeriesA-b
1/3A-b
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

Hi,

The timing of this is not perfect (sorry about that), but here's a refresh of this series.

The majority of the previous cover letter still applies:

Quoted 17 lines · CET Rafael J. Wysocki

This is based on the RFC posted a few days ago:

https://lore.kernel.org/linux-pm/1817571.2o5Kk4Ohv2@kreacher/

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.

Quoted 5 lines

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.

In this second revision there are three patches (one preparatory patch for schedutil that hasn't changed since the v1, the introduction of the new callback and schedutil changes in patch [2/3] and the intel_pstate changes in patch [3/3] that are the same as before.

Please see patch changelogs for details.

Thanks!