Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
"Fix an idle CPU selection bug, and an AMD Ryzen maximum frequency
enumeration bug"

* tag 'sched-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, sched: Fix the AMD CPPC maximum performance value on certain AMD Ryzen generations
sched/fair: Fix clearing of has_idle_cores flag in select_idle_cpu()

+25 -3
+2
arch/x86/include/asm/processor.h
··· 787 787 788 788 #ifdef CONFIG_CPU_SUP_AMD 789 789 extern u32 amd_get_nodes_per_socket(void); 790 + extern u32 amd_get_highest_perf(void); 790 791 #else 791 792 static inline u32 amd_get_nodes_per_socket(void) { return 0; } 793 + static inline u32 amd_get_highest_perf(void) { return 0; } 792 794 #endif 793 795 794 796 static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves)
+16
arch/x86/kernel/cpu/amd.c
··· 1165 1165 break; 1166 1166 } 1167 1167 } 1168 + 1169 + u32 amd_get_highest_perf(void) 1170 + { 1171 + struct cpuinfo_x86 *c = &boot_cpu_data; 1172 + 1173 + if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) || 1174 + (c->x86_model >= 0x70 && c->x86_model < 0x80))) 1175 + return 166; 1176 + 1177 + if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) || 1178 + (c->x86_model >= 0x40 && c->x86_model < 0x70))) 1179 + return 166; 1180 + 1181 + return 255; 1182 + } 1183 + EXPORT_SYMBOL_GPL(amd_get_highest_perf);
+1 -1
arch/x86/kernel/smpboot.c
··· 2043 2043 return false; 2044 2044 } 2045 2045 2046 - highest_perf = perf_caps.highest_perf; 2046 + highest_perf = amd_get_highest_perf(); 2047 2047 nominal_perf = perf_caps.nominal_perf; 2048 2048 2049 2049 if (!highest_perf || !nominal_perf) {
+5 -1
drivers/cpufreq/acpi-cpufreq.c
··· 646 646 return 0; 647 647 } 648 648 649 - highest_perf = perf_caps.highest_perf; 649 + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) 650 + highest_perf = amd_get_highest_perf(); 651 + else 652 + highest_perf = perf_caps.highest_perf; 653 + 650 654 nominal_perf = perf_caps.nominal_perf; 651 655 652 656 if (!highest_perf || !nominal_perf) {
+1 -1
kernel/sched/fair.c
··· 6217 6217 } 6218 6218 6219 6219 if (has_idle_core) 6220 - set_idle_cores(this, false); 6220 + set_idle_cores(target, false); 6221 6221 6222 6222 if (sched_feat(SIS_PROP) && !has_idle_core) { 6223 6223 time = cpu_clock(this) - time;