We find some devices' CPU with CPPC support breaks the autonomous mode.
However, without Kernel Governer, making CPU stay in highest_performace
largely increase the CPU power consumption. As a concession, we enforace
ACPI _CPC check to enable CPPC by default. Also, provide a sysctl to
disable this check.
Details
- Reviewers
olce
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 74740 Build 71623: arc lint + arc unit
Event Timeline
Looks good. One suggestion in an inline comment. Only thing now is the dependency on the CPPC lib, I'll review the other revisions and come back to here.
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 1064–1067 | I'd wrap the block around the ACPI check in a if ((sc->flags & HWPFL_USE_CPPC) != 0) to avoid calling acpi_cppc_ctx_init() at all if CPUID already indicates the feature is not supported. Doing so also delineates a bit more the assignment to sc->cppc.ctx, which wasn't that visible at first. | |
So, as I feared, the CPC parsing library needs significant work.
In the interest of moving this revision forward sooner, I'd suggest breaking the dependency to D55474 by, instead of calling acpi_cppc_ctx_init(), directly evaluating whether _CPC exists in the ACPI namespace (under #ifdef DEV_ACPI), possibly by calling a helper defined in our ACPI code.
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 1064–1067 | It is required as we use this context to check if we need to enter autonomous mode. | |