Skip to content

Adjustments for preferred core detection

Mario Limonciello linux-acpi linux-pm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 6 repliesIn review
  2. v211 patches 6 repliesSuperseded
  3. v18 patches 26 repliesSuperseded

Changes in v3 from the cover letter · 16 lines

* Pick up tags
* Fix LKP reported issue
Mario Limonciello (11):
x86/amd: Move amd_get_highest_perf() from amd.c to cppc.c
ACPI: CPPC: Adjust return code for inline functions in
!CONFIG_ACPI_CPPC_LIB
x86/amd: Rename amd_get_highest_perf() to
amd_get_boost_ratio_numerator()
ACPI: CPPC: Drop check for non zero perf ratio
ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn x86/amd: Move amd_get_highest_perf() out of amd-pstate x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()
cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into
amd_get_boost_ratio_numerator()
cpufreq: amd-pstate: Optimize amd_pstate_update_limits()
cpufreq: amd-pstate: Add documentation for amd_pstate_hw_prefcore
amd-pstate: Add missing documentation for
amd_pstate_prefcore_ranking

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11x86/amd: Move amd_get_highest_perf() from amd.c to cppc.carch/x86/kernel/acpi/cppc.c arch/x86/kernel/cpu/amd.c+16 -160 replies
2/11ACPI: CPPC: Adjust return code for inline functions in !CONFIG_ACPI_CPPC_LIBinclude/acpi/cppc_acpi.h+13 -130 replies
3/11x86/amd: Rename amd_get_highest_perf() to amd_get_boost_ratio_numerator()arch/x86/include/asm/processor.h arch/x86/kernel/acpi/cppc.c drivers/cpufreq/acpi-cpufreq.c +1 more+46 -180 replies
4/11ACPI: CPPC: Drop check for non zero perf ratioarch/x86/kernel/acpi/cppc.c+1 -60 replies
5/11ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warnarch/x86/kernel/acpi/cppc.c+3 -30 replies
6/11x86/amd: Move amd_get_highest_perf() out of amd-pstatearch/x86/kernel/acpi/cppc.c drivers/cpufreq/amd-pstate.c include/acpi/cppc_acpi.h+37 -320 replies
7/11x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()arch/x86/kernel/acpi/cppc.c drivers/cpufreq/amd-pstate.c include/acpi/cppc_acpi.h+101 -310 replies
8/11cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()Documentation/admin-guide/pm/amd-pstate.rst arch/x86/kernel/acpi/cppc.c drivers/cpufreq/amd-pstate.c+28 -430 replies
9/11cpufreq: amd-pstate: Optimize amd_pstate_update_limits()drivers/cpufreq/amd-pstate.c+5 -50 replies
10/11cpufreq: amd-pstate: Add documentation for `amd_pstate_hw_prefcore`Documentation/admin-guide/pm/amd-pstate.rst+5 -02 replies
11/11amd-pstate: Add missing documentation for `amd_pstate_prefcore_ranking`Documentation/admin-guide/pm/amd-pstate.rst+8 -10 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchPerry YuanGautham R. Shenoy
1/11R-b R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b R-b
6/11R-b R-b
7/11R-b
8/11R-b
9/11R-b R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/11] Adjustments for preferred core detection

From: Mario Limonciello <[email protected]>

Preferred core detection is fragile in that any CPU that reports less than 255 for any core is assumed to be a preferred core design. This might not always be true, so it's better to check all CPUs and see that varying values are actually reported.

Furthermore, preferred core detection isn't used by acpi-cpufreq. So incorrect frequencies are used unless amd-pstate is active.

This series moves preferred core detection out of amd-pstate in a more robust fashion. It also removes some tech debt of hardcoded values for platforms that are actually preferred core platforms.

This branch is based off v6.11-rc6.

v2->v3:
* Pick up tags
* Fix LKP reported issue
Mario Limonciello (11):
x86/amd: Move amd_get_highest_perf() from amd.c to cppc.c
ACPI: CPPC: Adjust return code for inline functions in
!CONFIG_ACPI_CPPC_LIB
x86/amd: Rename amd_get_highest_perf() to
amd_get_boost_ratio_numerator()
ACPI: CPPC: Drop check for non zero perf ratio
ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn x86/amd: Move amd_get_highest_perf() out of amd-pstate x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()
cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into
amd_get_boost_ratio_numerator()
cpufreq: amd-pstate: Optimize amd_pstate_update_limits()
cpufreq: amd-pstate: Add documentation for amd_pstate_hw_prefcore
amd-pstate: Add missing documentation for
amd_pstate_prefcore_ranking

 Documentation/admin-guide/pm/amd-pstate.rst |  15 +-
 arch/x86/include/asm/processor.h            |   3 -
 arch/x86/kernel/acpi/cppc.c                 | 172 ++++++++++++++++++--
 arch/x86/kernel/cpu/amd.c                   |  16 --
 drivers/cpufreq/acpi-cpufreq.c              |  12 +-
 drivers/cpufreq/amd-pstate.c                | 128 ++++-----------
 include/acpi/cppc_acpi.h                    |  41 +++--
 7 files changed, 241 insertions(+), 146 deletions(-)
Signature · 1 line
2.43.0