x86, sched: Add support for frequency invariance on ATOM_GOLDMONT*
authorGiovanni Gherdovich <ggherdovich@suse.cz>
Wed, 22 Jan 2020 15:16:15 +0000 (16:16 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 Jan 2020 20:37:04 +0000 (21:37 +0100)
commiteacf0474aec8bdccdc7f19386319127c67be3588
treeefb7b1b70d507ec9ccaa00f07a64fe5a0d7c3a11
parent8bea0dfb4a820ae063568a87cc2e7d8f587377af
x86, sched: Add support for frequency invariance on ATOM_GOLDMONT*

The scheduler needs the ratio freq_curr/freq_max for frequency-invariant
accounting. On GOLDMONT (aka Apollo Lake), GOLDMONT_D (aka Denverton) and
GOLDMONT_PLUS CPUs (aka Gemini Lake) set freq_max to the highest frequency
reported by the CPU.

The encoding of turbo ratios for GOLDMONT* is identical to the one for
SKYLAKE_X, but we treat the Atom case apart because we want to set freq_max to
a higher value, thus the ratio freq_curr/freq_max to be lower, leading to more
conservative frequency selections (favoring power efficiency).

Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lkml.kernel.org/r/20200122151617.531-5-ggherdovich@suse.cz
arch/x86/kernel/smpboot.c