cpufreq: amd-pstate: add amd-pstate driver parameter for mode selection
authorPerry Yuan <Perry.Yuan@amd.com>
Thu, 17 Nov 2022 07:35:39 +0000 (15:35 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Nov 2022 18:57:15 +0000 (19:57 +0100)
commit202e683df37cdf4c38e06e56ac91cc170ef49058
tree84b0dcc00b2d82d85c4c7833b7747b1ed13b81d7
parent456ca88d8a5258fc66edc42a10053ac8473de2b1
cpufreq: amd-pstate: add amd-pstate driver parameter for mode selection

When the amd_pstate driver is built-in users still need a method to be
able enable or disable it depending upon their circumstance.
Add support for an early parameter to do this.

There is some performance degradation on a number of ASICs in the
passive mode. This performance issue was originally discovered in
shared memory systems but it has been proven that certain workloads
on MSR systems also suffer performance issues.
Set the amd-pstate driver as disabled by default to temporarily
mitigate the performance problem.

 1) with `amd_pstate=disable`, pstate driver will be disabled to load at
    kernel booting.

 2) with `amd_pstate=passive`, pstate driver will be enabled and loaded
    as non-autonomous working mode supported in the low-level power
    management firmware.

 3) If neither parameter is specified, the driver will be disabled by
    default to avoid triggering performance regressions in certain ASICs

Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Tested-by: Wyes Karny <wyes.karny@amd.com>
Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate.c