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)
Sep 30 2024, 8:58 AM
Unknown Object (File)
Sep 24 2024, 7:38 AM
Unknown Object (File)
Sep 8 2024, 2:01 PM
Unknown Object (File)
Sep 4 2024, 7:21 AM
Unknown Object (File)
Sep 1 2024, 1:19 PM
Unknown Object (File)
Aug 31 2024, 8:11 PM
Unknown Object (File)
Aug 19 2024, 9:45 AM
Unknown Object (File)
Aug 13 2024, 3:19 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