mbox series

[V8,0/4] Add unit test module for AMD P-State driver

Message ID 20220526034725.1708916-1-li.meng@amd.com (mailing list archive)
Headers show
Series Add unit test module for AMD P-State driver | expand

Message

Meng, Li (Jassmine) May 26, 2022, 3:47 a.m. UTC
Hi all:

AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
the functions of amd-pstate driver.
It could import as a module to launch some test tasks.
1) It can help all users to verify their processor support (SBIOS/
Firmware or Hardware).
2) Kernel can have a basic function test to avoid the kernel regression
during the update.
3) We can introduce more functional or performance tests to align the
together, it will benefit power and performance scale optimization.

We upstream out AMD P-state driver into Linux kernel and use this unit
test module to verify the required conditions and basic functions of
amd-pstate before integration test.

We use test module in the kselftest frameworks to implement it.
We create amd-pstate-ut module and tie it into kselftest.

For example: The test case aput_acpi_cpc is used to check whether the
_CPC object is exist in SBIOS.
The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
existed at the detected processor, so it is a necessary condition.

At present, it only implements the basic framework and some simple test
cases.

TODO : 1) we will add more test cases to improve the depth and coverage of
the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
netperf, speedometer, and etc. testing and monitor the cpu frequency and
performance goals change, power consumption at runtime. 

Please check the documentation amd-pstate.rst for details of the test steps.

See patch series in below git repo:
V1: https://lore.kernel.org/linux-pm/20220323071502.2674156-1-li.meng@amd.com/
V2: https://lore.kernel.org/lkml/20220413090510.4039589-1-li.meng@amd.com/
V3: https://lore.kernel.org/lkml/20220421074152.599419-1-li.meng@amd.com/ 
V4: https://lore.kernel.org/lkml/20220427135315.3447550-1-li.meng@amd.com/
V5: https://lore.kernel.org/lkml/20220505022913.329259-1-li.meng@amd.com/ 
V6: https://lore.kernel.org/lkml/20220519134737.359290-1-li.meng@amd.com/
V7: https://lore.kernel.org/lkml/20220522115423.1147282-1-li.meng@amd.com/

Changes from V1 -> V2:
- cpufreq: amd-pstate:
- - add a trailing of amd-pstate.h to MAINTAINER AMD PSTATE DRIVER.
- selftests: cpufreq:
- - add a wrapper shell script for the amd_pstate_testmod module.
- selftests: cpufreq:
- - remove amd_pstate_testmod kernel module to
  .../cpufreq/amd_pstate_testmod.
- Documentation: amd-pstate:
- - amd_pstate_testmod rst document is not provided at present.

Changes from V2 -> V3:
- cpufreq: amd-pstate:
- - adjust the order of add amd-pstate.h in MAINTAINERS.
- selftests: cpufreq:
- - remove the call of amd_pstate_testmod.sh from cpufreq Makefile to
  main.sh.
- selftests: cpufreq:
- - add explain the goal or intention of the AMD P-State Unit Test
  module.
- - modify comments.
- - use the checkpatch.pl to check my patches.
- - add conditions judgment before formal test.
- - delete some unnecessary test cases.
- - modify test cases about perf and performance etc.

Changes from V3 -> V4:
- selftests: amd-pstate:
- - remove script and test module to tools/testing/selftests/amd-pstate/
- - uniformly named amd-pstate-ut.
- - check current architectures and cpufreq driver in amd-pstate-ut.sh
- - delete codes about conditions in amd-pstate-ut.c 
- Documentation: amd-pstate:
- - add introduce document about amd-pstate unit test.

Changes from V4 -> V5:
- selftests: amd-pstate:
- - add print the current scaling_driver.
- - add amd-pstate-ut.ko into TEST_GEN_FILES.
- - move "insmod/rmmod amd-pstate-ut.ko" stuff into script amd_pstate_ut.sh
- - add a check of read back from X86_FEATURE_CPPC in get_shared_mem().
- Documentation: amd-pstate:
- - delete the test step about insmod/rmmod amd-pstate-ut.ko

Changes from V5 -> V6:
- cpufreq: amd-pstate:
- - add amd-pstate-ut test codes to drivers/cpurfreq
- - add the macro CONFIG_X86_AMD_PSTATE_UT
- selftests: amd-pstate:
- - delete amd-pstate-ut test codes from tools/testing/selftests/amd-pstate/

Changes from V6 -> V7:
- cpufreq: amd-pstate:
- - modify X86_AMD_PSTATE_UT dependencies and default value.
- - modify a brief description of the amd-pstate-ut module.
- - remove kselftest_module.h header include.
- - modify shortform for AMD P-State unit test.
- - add prefix for the names of test cases.
- - in the file operation log, add the file path.
- - add comments about the test cases.
- - correct syntax errors.
- selftests: amd-pstate:
- - delete TEST_GEN_FILES$(TEST_GEN_FILES): $(HEADERS) form amd-pstate Makefile.
- - simplify the judgment about ARCH.
- - add the judgment about cpu vendor.
- - modify the method about load the amd-pstate-ut module.
- Documentation: amd-pstate:
- - update the name of the test function.
- - update kernel log about test result.

Changes from V7 -> V8:
- cpufreq: amd-pstate:
- - amend commit message.
- - amend module description.
- Documentation: amd-pstate:
- - amend commit message.
- - Remove the personal data.

Thanks,
Jasmine

Meng Li (4):
  cpufreq: amd-pstate: Expose struct amd_cpudata
  cpufreq: amd-pstate: Add test module for amd-pstate driver
  selftests: amd-pstate: Add test trigger for amd-pstate driver
  Documentation: amd-pstate: Add unit test introduction

 Documentation/admin-guide/pm/amd-pstate.rst   |  76 +++++
 MAINTAINERS                                   |   1 +
 drivers/cpufreq/Kconfig.x86                   |   7 +
 drivers/cpufreq/Makefile                      |   1 +
 drivers/cpufreq/amd-pstate-ut.c               | 293 ++++++++++++++++++
 drivers/cpufreq/amd-pstate.c                  |  60 +---
 include/linux/amd-pstate.h                    |  77 +++++
 tools/testing/selftests/Makefile              |   1 +
 tools/testing/selftests/amd-pstate/Makefile   |   9 +
 .../selftests/amd-pstate/amd-pstate-ut.sh     |  55 ++++
 tools/testing/selftests/amd-pstate/config     |   1 +
 11 files changed, 522 insertions(+), 59 deletions(-)
 create mode 100644 drivers/cpufreq/amd-pstate-ut.c
 create mode 100644 include/linux/amd-pstate.h
 create mode 100644 tools/testing/selftests/amd-pstate/Makefile
 create mode 100755 tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
 create mode 100644 tools/testing/selftests/amd-pstate/config

Comments

Huang Rui May 26, 2022, 7:31 a.m. UTC | #1
These series look pretty good for me, thank you Jassmine!

Thanks,
Ray

On Thu, May 26, 2022 at 11:47:21AM +0800, Meng, Li (Jassmine) wrote:
> Hi all:
> 
> AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
> the functions of amd-pstate driver.
> It could import as a module to launch some test tasks.
> 1) It can help all users to verify their processor support (SBIOS/
> Firmware or Hardware).
> 2) Kernel can have a basic function test to avoid the kernel regression
> during the update.
> 3) We can introduce more functional or performance tests to align the
> together, it will benefit power and performance scale optimization.
> 
> We upstream out AMD P-state driver into Linux kernel and use this unit
> test module to verify the required conditions and basic functions of
> amd-pstate before integration test.
> 
> We use test module in the kselftest frameworks to implement it.
> We create amd-pstate-ut module and tie it into kselftest.
> 
> For example: The test case aput_acpi_cpc is used to check whether the
> _CPC object is exist in SBIOS.
> The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
> existed at the detected processor, so it is a necessary condition.
> 
> At present, it only implements the basic framework and some simple test
> cases.
> 
> TODO : 1) we will add more test cases to improve the depth and coverage of
> the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
> netperf, speedometer, and etc. testing and monitor the cpu frequency and
> performance goals change, power consumption at runtime. 
> 
> Please check the documentation amd-pstate.rst for details of the test steps.
> 
> See patch series in below git repo:
> V1: https://lore.kernel.org/linux-pm/20220323071502.2674156-1-li.meng@amd.com/
> V2: https://lore.kernel.org/lkml/20220413090510.4039589-1-li.meng@amd.com/
> V3: https://lore.kernel.org/lkml/20220421074152.599419-1-li.meng@amd.com/ 
> V4: https://lore.kernel.org/lkml/20220427135315.3447550-1-li.meng@amd.com/
> V5: https://lore.kernel.org/lkml/20220505022913.329259-1-li.meng@amd.com/ 
> V6: https://lore.kernel.org/lkml/20220519134737.359290-1-li.meng@amd.com/
> V7: https://lore.kernel.org/lkml/20220522115423.1147282-1-li.meng@amd.com/
> 
> Changes from V1 -> V2:
> - cpufreq: amd-pstate:
> - - add a trailing of amd-pstate.h to MAINTAINER AMD PSTATE DRIVER.
> - selftests: cpufreq:
> - - add a wrapper shell script for the amd_pstate_testmod module.
> - selftests: cpufreq:
> - - remove amd_pstate_testmod kernel module to
>   .../cpufreq/amd_pstate_testmod.
> - Documentation: amd-pstate:
> - - amd_pstate_testmod rst document is not provided at present.
> 
> Changes from V2 -> V3:
> - cpufreq: amd-pstate:
> - - adjust the order of add amd-pstate.h in MAINTAINERS.
> - selftests: cpufreq:
> - - remove the call of amd_pstate_testmod.sh from cpufreq Makefile to
>   main.sh.
> - selftests: cpufreq:
> - - add explain the goal or intention of the AMD P-State Unit Test
>   module.
> - - modify comments.
> - - use the checkpatch.pl to check my patches.
> - - add conditions judgment before formal test.
> - - delete some unnecessary test cases.
> - - modify test cases about perf and performance etc.
> 
> Changes from V3 -> V4:
> - selftests: amd-pstate:
> - - remove script and test module to tools/testing/selftests/amd-pstate/
> - - uniformly named amd-pstate-ut.
> - - check current architectures and cpufreq driver in amd-pstate-ut.sh
> - - delete codes about conditions in amd-pstate-ut.c 
> - Documentation: amd-pstate:
> - - add introduce document about amd-pstate unit test.
> 
> Changes from V4 -> V5:
> - selftests: amd-pstate:
> - - add print the current scaling_driver.
> - - add amd-pstate-ut.ko into TEST_GEN_FILES.
> - - move "insmod/rmmod amd-pstate-ut.ko" stuff into script amd_pstate_ut.sh
> - - add a check of read back from X86_FEATURE_CPPC in get_shared_mem().
> - Documentation: amd-pstate:
> - - delete the test step about insmod/rmmod amd-pstate-ut.ko
> 
> Changes from V5 -> V6:
> - cpufreq: amd-pstate:
> - - add amd-pstate-ut test codes to drivers/cpurfreq
> - - add the macro CONFIG_X86_AMD_PSTATE_UT
> - selftests: amd-pstate:
> - - delete amd-pstate-ut test codes from tools/testing/selftests/amd-pstate/
> 
> Changes from V6 -> V7:
> - cpufreq: amd-pstate:
> - - modify X86_AMD_PSTATE_UT dependencies and default value.
> - - modify a brief description of the amd-pstate-ut module.
> - - remove kselftest_module.h header include.
> - - modify shortform for AMD P-State unit test.
> - - add prefix for the names of test cases.
> - - in the file operation log, add the file path.
> - - add comments about the test cases.
> - - correct syntax errors.
> - selftests: amd-pstate:
> - - delete TEST_GEN_FILES$(TEST_GEN_FILES): $(HEADERS) form amd-pstate Makefile.
> - - simplify the judgment about ARCH.
> - - add the judgment about cpu vendor.
> - - modify the method about load the amd-pstate-ut module.
> - Documentation: amd-pstate:
> - - update the name of the test function.
> - - update kernel log about test result.
> 
> Changes from V7 -> V8:
> - cpufreq: amd-pstate:
> - - amend commit message.
> - - amend module description.
> - Documentation: amd-pstate:
> - - amend commit message.
> - - Remove the personal data.
> 
> Thanks,
> Jasmine
> 
> Meng Li (4):
>   cpufreq: amd-pstate: Expose struct amd_cpudata
>   cpufreq: amd-pstate: Add test module for amd-pstate driver
>   selftests: amd-pstate: Add test trigger for amd-pstate driver
>   Documentation: amd-pstate: Add unit test introduction
> 
>  Documentation/admin-guide/pm/amd-pstate.rst   |  76 +++++
>  MAINTAINERS                                   |   1 +
>  drivers/cpufreq/Kconfig.x86                   |   7 +
>  drivers/cpufreq/Makefile                      |   1 +
>  drivers/cpufreq/amd-pstate-ut.c               | 293 ++++++++++++++++++
>  drivers/cpufreq/amd-pstate.c                  |  60 +---
>  include/linux/amd-pstate.h                    |  77 +++++
>  tools/testing/selftests/Makefile              |   1 +
>  tools/testing/selftests/amd-pstate/Makefile   |   9 +
>  .../selftests/amd-pstate/amd-pstate-ut.sh     |  55 ++++
>  tools/testing/selftests/amd-pstate/config     |   1 +
>  11 files changed, 522 insertions(+), 59 deletions(-)
>  create mode 100644 drivers/cpufreq/amd-pstate-ut.c
>  create mode 100644 include/linux/amd-pstate.h
>  create mode 100644 tools/testing/selftests/amd-pstate/Makefile
>  create mode 100755 tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
>  create mode 100644 tools/testing/selftests/amd-pstate/config
> 
> -- 
> 2.25.1
>
Shuah Khan May 26, 2022, 3:44 p.m. UTC | #2
On 5/25/22 9:47 PM, Meng Li wrote:
> Hi all:
> 
> AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
> the functions of amd-pstate driver.
> It could import as a module to launch some test tasks.
> 1) It can help all users to verify their processor support (SBIOS/
> Firmware or Hardware).
> 2) Kernel can have a basic function test to avoid the kernel regression
> during the update.
> 3) We can introduce more functional or performance tests to align the
> together, it will benefit power and performance scale optimization.
> 
> We upstream out AMD P-state driver into Linux kernel and use this unit
> test module to verify the required conditions and basic functions of
> amd-pstate before integration test.
> 
> We use test module in the kselftest frameworks to implement it.
> We create amd-pstate-ut module and tie it into kselftest.
> 
> For example: The test case aput_acpi_cpc is used to check whether the
> _CPC object is exist in SBIOS.
> The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
> existed at the detected processor, so it is a necessary condition.
> 
> At present, it only implements the basic framework and some simple test
> cases.
> 
> TODO : 1) we will add more test cases to improve the depth and coverage of
> the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
> netperf, speedometer, and etc. testing and monitor the cpu frequency and
> performance goals change, power consumption at runtime.
> 
> Please check the documentation amd-pstate.rst for details of the test steps.
> 
> See patch series in below git repo:
> V1: https://lore.kernel.org/linux-pm/20220323071502.2674156-1-li.meng@amd.com/
> V2: https://lore.kernel.org/lkml/20220413090510.4039589-1-li.meng@amd.com/
> V3: https://lore.kernel.org/lkml/20220421074152.599419-1-li.meng@amd.com/
> V4: https://lore.kernel.org/lkml/20220427135315.3447550-1-li.meng@amd.com/
> V5: https://lore.kernel.org/lkml/20220505022913.329259-1-li.meng@amd.com/
> V6: https://lore.kernel.org/lkml/20220519134737.359290-1-li.meng@amd.com/
> V7: https://lore.kernel.org/lkml/20220522115423.1147282-1-li.meng@amd.com/
> 

> 
> Changes from V7 -> V8:
> - cpufreq: amd-pstate:
> - - amend commit message.
> - - amend module description.
> - Documentation: amd-pstate:
> - - amend commit message.
> - - Remove the personal data.
> 

Looks good to me. Thank you.

Rafael, Viresh,

How do you want to handle this patch series? We are in merge window
and this would be for Linux 5.20 based on the changes and content.

Would you like to take the entire patch series through your tree, you
have my Ack(s) and Reviewed-by(s)

thanks,
-- Shuah
Shuah Khan June 9, 2022, 8:28 p.m. UTC | #3
On 5/26/22 9:44 AM, Shuah Khan wrote:
> On 5/25/22 9:47 PM, Meng Li wrote:
>> Hi all:
>>
>> AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
>> the functions of amd-pstate driver.
>> It could import as a module to launch some test tasks.
>> 1) It can help all users to verify their processor support (SBIOS/
>> Firmware or Hardware).
>> 2) Kernel can have a basic function test to avoid the kernel regression
>> during the update.
>> 3) We can introduce more functional or performance tests to align the
>> together, it will benefit power and performance scale optimization.
>>
>> We upstream out AMD P-state driver into Linux kernel and use this unit
>> test module to verify the required conditions and basic functions of
>> amd-pstate before integration test.
>>
>> We use test module in the kselftest frameworks to implement it.
>> We create amd-pstate-ut module and tie it into kselftest.
>>
>> For example: The test case aput_acpi_cpc is used to check whether the
>> _CPC object is exist in SBIOS.
>> The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
>> existed at the detected processor, so it is a necessary condition.
>>
>> At present, it only implements the basic framework and some simple test
>> cases.
>>
>> TODO : 1) we will add more test cases to improve the depth and coverage of
>> the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
>> netperf, speedometer, and etc. testing and monitor the cpu frequency and
>> performance goals change, power consumption at runtime.
>>
>> Please check the documentation amd-pstate.rst for details of the test steps.
>>
>> See patch series in below git repo:
>> V1: https://lore.kernel.org/linux-pm/20220323071502.2674156-1-li.meng@amd.com/
>> V2: https://lore.kernel.org/lkml/20220413090510.4039589-1-li.meng@amd.com/
>> V3: https://lore.kernel.org/lkml/20220421074152.599419-1-li.meng@amd.com/
>> V4: https://lore.kernel.org/lkml/20220427135315.3447550-1-li.meng@amd.com/
>> V5: https://lore.kernel.org/lkml/20220505022913.329259-1-li.meng@amd.com/
>> V6: https://lore.kernel.org/lkml/20220519134737.359290-1-li.meng@amd.com/
>> V7: https://lore.kernel.org/lkml/20220522115423.1147282-1-li.meng@amd.com/
>>
> 
>>
>> Changes from V7 -> V8:
>> - cpufreq: amd-pstate:
>> - - amend commit message.
>> - - amend module description.
>> - Documentation: amd-pstate:
>> - - amend commit message.
>> - - Remove the personal data.
>>
> 
> Looks good to me. Thank you.
> 
> Rafael, Viresh,
> 
> How do you want to handle this patch series? We are in merge window
> and this would be for Linux 5.20 based on the changes and content.
> 
> Would you like to take the entire patch series through your tree, you
> have my Ack(s) and Reviewed-by(s)
> 

Picking this back up since rc1 is out. How do we want to handle this patch
series?

thanks,
-- Shuah
Huang Rui June 16, 2022, 8:27 a.m. UTC | #4
On Fri, Jun 10, 2022 at 04:28:27AM +0800, Shuah Khan wrote:
> On 5/26/22 9:44 AM, Shuah Khan wrote:
> > On 5/25/22 9:47 PM, Meng Li wrote:
> >> Hi all:
> >>
> >> AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
> >> the functions of amd-pstate driver.
> >> It could import as a module to launch some test tasks.
> >> 1) It can help all users to verify their processor support (SBIOS/
> >> Firmware or Hardware).
> >> 2) Kernel can have a basic function test to avoid the kernel regression
> >> during the update.
> >> 3) We can introduce more functional or performance tests to align the
> >> together, it will benefit power and performance scale optimization.
> >>
> >> We upstream out AMD P-state driver into Linux kernel and use this unit
> >> test module to verify the required conditions and basic functions of
> >> amd-pstate before integration test.
> >>
> >> We use test module in the kselftest frameworks to implement it.
> >> We create amd-pstate-ut module and tie it into kselftest.
> >>
> >> For example: The test case aput_acpi_cpc is used to check whether the
> >> _CPC object is exist in SBIOS.
> >> The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
> >> existed at the detected processor, so it is a necessary condition.
> >>
> >> At present, it only implements the basic framework and some simple test
> >> cases.
> >>
> >> TODO : 1) we will add more test cases to improve the depth and coverage of
> >> the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
> >> netperf, speedometer, and etc. testing and monitor the cpu frequency and
> >> performance goals change, power consumption at runtime.
> >>
> >> Please check the documentation amd-pstate.rst for details of the test steps.
> >>
> >> See patch series in below git repo:
> >> V1: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flinux-pm%2F20220323071502.2674156-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RhdyH9UelmQuEGokmUcPZKla%2FTr1j9GC%2BzC%2BPGD22xo%3D&reserved=0
> >> V2: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220413090510.4039589-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=f8%2BUhVE94oDnm9aWy2Bz9FmV9f2fBwOF%2B%2FfioZCjX5c%3D&reserved=0
> >> V3: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220421074152.599419-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QOYa%2FjtTrh3sXhMmMBPPIsY12%2BjVG%2B9hn1myQ0HhOpA%3D&reserved=0
> >> V4: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220427135315.3447550-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e4GBakHlYTqv0dhAUOmPu1CueJceKIjQCZ8OeHhgFqs%3D&reserved=0
> >> V5: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220505022913.329259-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l3zbZC6SjF0R%2BeAGN%2F32M4FnT16OTDv5FvCfKf%2FXDyw%3D&reserved=0
> >> V6: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220519134737.359290-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KW5KbwUOe1DReaKRvu2AttcXsCJYYr5zHrB%2FZvxPAYo%3D&reserved=0
> >> V7: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220522115423.1147282-1-li.meng%40amd.com%2F&data=05%7C01%7Cray.huang%40amd.com%7Cca871cbe21d34368046408da4a569d82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637904033129149948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JscI%2F69EuDNzZsQMGbgkyF3rAChKJl1nz2sZLxdm5H8%3D&reserved=0
> >>
> > 
> >>
> >> Changes from V7 -> V8:
> >> - cpufreq: amd-pstate:
> >> - - amend commit message.
> >> - - amend module description.
> >> - Documentation: amd-pstate:
> >> - - amend commit message.
> >> - - Remove the personal data.
> >>
> > 
> > Looks good to me. Thank you.
> > 
> > Rafael, Viresh,
> > 
> > How do you want to handle this patch series? We are in merge window
> > and this would be for Linux 5.20 based on the changes and content.
> > 
> > Would you like to take the entire patch series through your tree, you
> > have my Ack(s) and Reviewed-by(s)
> > 
> 
> Picking this back up since rc1 is out. How do we want to handle this patch
> series?
> 

Rafael, Shuah,

Would you mind to put this patch series in bleeding-edge of linux-pm kernel
tree?  Because we have some patches that based on the include/linux/amd-pstate.h
in patch 1 for amd-pstate driver next step.

Thanks,
Ray
Shuah Khan Aug. 15, 2022, 10:54 p.m. UTC | #5
On 6/9/22 2:28 PM, Shuah Khan wrote:
> On 5/26/22 9:44 AM, Shuah Khan wrote:
>> On 5/25/22 9:47 PM, Meng Li wrote:
>>> Hi all:
>>>
>>> AMD P-State unit test(amd-pstate-ut) is a kernel module for testing
>>> the functions of amd-pstate driver.
>>> It could import as a module to launch some test tasks.
>>> 1) It can help all users to verify their processor support (SBIOS/
>>> Firmware or Hardware).
>>> 2) Kernel can have a basic function test to avoid the kernel regression
>>> during the update.
>>> 3) We can introduce more functional or performance tests to align the
>>> together, it will benefit power and performance scale optimization.
>>>
>>> We upstream out AMD P-state driver into Linux kernel and use this unit
>>> test module to verify the required conditions and basic functions of
>>> amd-pstate before integration test.
>>>
>>> We use test module in the kselftest frameworks to implement it.
>>> We create amd-pstate-ut module and tie it into kselftest.
>>>
>>> For example: The test case aput_acpi_cpc is used to check whether the
>>> _CPC object is exist in SBIOS.
>>> The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is not
>>> existed at the detected processor, so it is a necessary condition.
>>>
>>> At present, it only implements the basic framework and some simple test
>>> cases.
>>>
>>> TODO : 1) we will add more test cases to improve the depth and coverage of
>>> the test. E.X. use the script to trigger the tbench, gitsource, kernbench,
>>> netperf, speedometer, and etc. testing and monitor the cpu frequency and
>>> performance goals change, power consumption at runtime.
>>>
>>> Please check the documentation amd-pstate.rst for details of the test steps.
>>>
>>> See patch series in below git repo:
>>> V1: https://lore.kernel.org/linux-pm/20220323071502.2674156-1-li.meng@amd.com/
>>> V2: https://lore.kernel.org/lkml/20220413090510.4039589-1-li.meng@amd.com/
>>> V3: https://lore.kernel.org/lkml/20220421074152.599419-1-li.meng@amd.com/
>>> V4: https://lore.kernel.org/lkml/20220427135315.3447550-1-li.meng@amd.com/
>>> V5: https://lore.kernel.org/lkml/20220505022913.329259-1-li.meng@amd.com/
>>> V6: https://lore.kernel.org/lkml/20220519134737.359290-1-li.meng@amd.com/
>>> V7: https://lore.kernel.org/lkml/20220522115423.1147282-1-li.meng@amd.com/
>>>
>>
>>>
>>> Changes from V7 -> V8:
>>> - cpufreq: amd-pstate:
>>> - - amend commit message.
>>> - - amend module description.
>>> - Documentation: amd-pstate:
>>> - - amend commit message.
>>> - - Remove the personal data.
>>>
>>
>> Looks good to me. Thank you.
>>
>> Rafael, Viresh,
>>
>> How do you want to handle this patch series? We are in merge window
>> and this would be for Linux 5.20 based on the changes and content.
>>
>> Would you like to take the entire patch series through your tree, you
>> have my Ack(s) and Reviewed-by(s)
>>
> 
> Picking this back up since rc1 is out. How do we want to handle this patch
> series?
> 

Please send me rebased version. I will apply it for the net release.

thanks,
-- Shuah