]> git.baikalelectronics.ru Git - kernel.git/commit
x86, sched: Account for CPUs with less than 4 cores in freq. invariance
authorGiovanni Gherdovich <ggherdovich@suse.cz>
Thu, 16 Apr 2020 05:47:43 +0000 (07:47 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 22 Apr 2020 21:10:13 +0000 (23:10 +0200)
commit5067742a53dfe47646ea17e7ade17848947d178c
treeeef4b477b47cbcf926942e4eb7cf74799177edea
parent4a2927d780d2fa0322e289c84d54ecbd4f4f35ec
x86, sched: Account for CPUs with less than 4 cores in freq. invariance

If a CPU has less than 4 physical cores, MSR_TURBO_RATIO_LIMIT will
rightfully report that the 4C turbo ratio is zero. In such cases, use the
1C turbo ratio instead for frequency invariance calculations.

Fixes: 1d4a48296206 ("x86, sched: Add support for frequency invariance")
Reported-by: Like Xu <like.xu@linux.intel.com>
Reported-by: Neil Rickert <nwr10cst-oslnx@yahoo.com>
Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Link: https://lkml.kernel.org/r/20200416054745.740-3-ggherdovich@suse.cz
arch/x86/kernel/smpboot.c