Message ID | 20201204170326.4178-1-ggherdovich@suse.cz (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [v4,RESEND] x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC | expand |
On Fri, 2020-12-04 at 18:03 +0100, Giovanni Gherdovich wrote: > Frequency invariant accounting calculations need the ratio > freq_curr/freq_max, but freq_max is unknown as it depends on dynamic power > allocation between cores: AMD EPYC CPUs implement "Core Performance Boost". > Three candidates are considered to estimate this value: > [...] > > Benchmarks are described in the next section. > Tilde (~) means the value is the same as baseline. > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ondemand perfgov sugov-noinv sugov-max sugov-mid sugov-P0 better if > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > [...] Hello, this patch is currently merged in the tip tree, branch sched/core as commit 46609527577d1def0af29ca5b56cffeeea771ada. Unfortunately in the original commit message I used "----------" for making table headers, and git dropped all the commit message after that sign, i.e. the benchmark results and my signed-off-by. In this "resend" I replaced the offending sign and the new commit message should make it intact to the destination tree. Thanks, Giovanni
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a4ab5cf6aeab..c5dd5f6199d9 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -2054,6 +2054,8 @@ static bool amd_set_max_freq_ratio(void) } perf_ratio = div_u64(highest_perf * SCHED_CAPACITY_SCALE, nominal_perf); + /* midpoint between max_boost and max_P */ + perf_ratio = (perf_ratio + SCHED_CAPACITY_SCALE) >> 1; if (!perf_ratio) { pr_debug("Non-zero highest/nominal perf values led to a 0 ratio\n"); return false;