cpufreq: add scaled minimum capacity tracking for policy changes

When the minimum frequency available to a policy is modified either
by userspace or by external actors setting a minimum frequency for a
voltage domain to control behaviour of some connected component, we
expect that the cpufreq policy will be updated to reflect this.

If we wish to use this information to guide energy estimation and
scheduling decisions, we need to track it.
Implement cpufreq_scale_min_freq_capacity() to provide the scheduler
with a minimum frequency scaling correction factor for more accurate
cpu capacity information.
This scaling factor describes the influence of running a cpu with a
current policy minimum frequency higher than the minimum possible
frequency.

The factor is:
	current_min_freq(cpu) << SCHED_CAPACITY_SHIFT / max_freq(cpu)

This factor is computed in scale_min_freq_capacity and returned,
per cpu, in cpufreq_scale_min_freq_capacity.

Change-Id: I66237025a7c0bce6bfd6e973ea22b8d3f6c41827
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Git-commit: 0f96d86732ff89f317a707f9bf4fdf33fe0c02d7
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2 files changed