Summary: | CPU frequency scaling fails for multiple cores | ||
---|---|---|---|
Product: | Base System | Reporter: | D Green <dfrg> |
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | cem, dg, freebsd.ed.lists, jamie, sascha.folie, schaiba |
Priority: | --- | ||
Version: | 12.0-RELEASE | ||
Hardware: | amd64 | ||
OS: | Any |
Description
D Green
2018-12-28 09:22:15 UTC
If you set debug.acpi.disabled="thermal" in loader.conf and reboot, does powerd / sysctl work? It seems any kernel setting overrides and userspace space setting. A related question, what are the temperature sensors reporting? Is your CPU cooled appropriately / might it be reasonable that thermal throttling is kicking in? This code hasn't changed substantially in a long time, so I suspect this is not some recent regression. It could be that this is related to my observation: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234733 Still present in 12.1-RELEASE-p1 @Dave, did you try debug.acpi.disabled="thermal"? It seems bizarre that the default dev.cpu.0.freq is 800. Is that the case at boot, or was your initial description after running, say, powerd? It might be that Coffeelake does not really support est and needs Intel Speed Shift instead. That is not yet in tree but there is a work-in-progress patch: https://reviews.freebsd.org/D18028 @Erich, I suspect these are unrelated issues in that a different cpufreq driver is used on Zen (hwpstate) and Intel (est). But maybe there is some relation. I do not recommend powerd and would suggest disabling it. In fact, we should probably remove it from FreeBSD. It is extremely legacy and only really works correctly on ancient single core devices. I also don't recommend manual p-state setting via sysctl. Modern CPUs do a fantastic job of power saving with C states alone — P-state throttling doesn't get you much anymore. CPU is 800 at boot either with or without powerd.
Temperature is always stable at 25 degrees.
I'll retry debug.acpi.disabled="thermal" but I don't recall it having any effect for 11.2-RELEASE.
If I comment out the conditional in cf_set_method() at kern/kern_cpu.c:291 then both sysctl and powerd can be used to adjust the frequency.
> if (priority < sc->curr_priority) {
> CF_DEBUG("ignoring, curr prio %d less than %d\n", priority,
> sc->curr_priority);
> error = EPERM;
> goto out;
> }
I wonder where those bogus priorities are coming from, though. I thought I recall looking and seeing acpi_thermal as the only possible source, but I might be mistaken. Also: 800 at boot sounds like a BIOS bug. FWIW, debug.acpi.disabled="thermal" on my 12.1-p1 system on a AMD Ryzen seems to have solved the issue I had with the CPU staying at the lowest frequency even when building world. Fixed in 13.0-RELEASE |