Page MenuHomeFreeBSD

Patch acpi_thermal to work on CPUs with independent frequency control.
Needs ReviewPublic

Authored by crahman_gmail.com on Jul 3 2022, 9:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 9:06 PM
Unknown Object (File)
Mon, Mar 25, 4:15 AM
Unknown Object (File)
Mon, Mar 18, 5:08 PM
Unknown Object (File)
Sat, Mar 2, 6:57 AM
Unknown Object (File)
Feb 18 2024, 5:38 AM
Unknown Object (File)
Jan 11 2024, 8:21 AM
Unknown Object (File)
Dec 23 2023, 12:55 PM
Unknown Object (File)
Dec 13 2023, 3:17 PM

Details

Reviewers
cem
jhb
Summary

See FreeBSD Bugzilla – Bug 264775; https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264775

The current acpi_thermal scheme only changes the frequency of CPU0. With
independent processor frequencies, such as with the Cerleron N4120 Quad, this
no longer has an adequate affect upon power consumption.

This patch sets all the processors to the same frequency, following the example of
kern/kern_cpu.c.

Passive cooling has not worked properly on many systems for many years. And it's worse than it might seem - if acpi_thermal is activated on these systems, not only is the cpu frequency not often not reduced in a useful way, but frequency control itself breaks because kern_cpu.c requires CPUFREQ_GET() to be run before CPUFREQ_SET(), otherwise on a restore sc->curr_level.total_set.freq is set to CPUFREQ_VAL_UNKNOWN. Then the next save/restore will fail. This then causes the system to get stuck at the saved frequency until a reboot, causing very poor performance.

Test Plan

Performing a 'make -j 5 buildkernel' with the cooling fan on and off.

Results are as expected.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped