• Viresh Kumar's avatar
    cpufreq: intel_pstate: Implement QoS supported freq constraints · da5c504c
    Viresh Kumar authored
    Intel pstate driver exposes min_perf_pct and max_perf_pct sysfs files,
    which can be used to force a limit on the min/max P state of the driver.
    Though these files eventually control the min/max frequencies that the
    CPUs will run at, they don't make a change to policy->min/max values.
    
    When the values of these files are changed (in passive mode of the
    driver), it leads to calling ->limits() callback of the cpufreq
    governors, like schedutil. On a call to it the governors shall
    forcefully update the frequency to come within the limits. Since the
    limits, i.e.  policy->min/max, aren't updated by the driver, the
    governors fails to get the target freq within limit and sometimes aborts
    the update believing that the frequency is already set to the target
    value.
    
    This patch implements the QoS supported frequency constraints to update
    policy->min/max values whenever min_perf_pct or max_perf_pct files are
    updated. This is only done for the passive mode as of now, as the driver
    is already working fine in active mode.
    
    Fixes: ecd28842 ("cpufreq: schedutil: Don't set next_freq to UINT_MAX")
    Reported-by: default avatarDoug Smythies <dsmythies@telus.net>
    Tested-by: default avatarDoug Smythies <dsmythies@telus.net>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    da5c504c
intel_pstate.c 70 KB