mbox series

[V3,0/4] Add tbench/gitsource new test cases for amd-pstate-ut

Message ID 20220914061105.1982477-1-li.meng@amd.com
Headers show
Series Add tbench/gitsource new test cases for amd-pstate-ut | expand

Message

Meng, Li (Jassmine) Sept. 14, 2022, 6:11 a.m. UTC
Hi all:

First, we modify amd-pstate-ut.sh to basic.sh as a basic test, mainly for
AMD P-State kernel drivers. The purpose of this modification is to
facilitate the subsequent addition of gitsource, tbench and other tests.
You can test specific functions by specifying test cases.
Default test all cases, include basic, tbench and gitsource etc.

Secondly, add tbench.sh trigger the tbench testing and monitor the cpu
information.
1) Download and install tbench codes.
2) Run tbench benchmark on specific governors, ondemand or schedutil.
3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver.
4) Get desire performance, frequency, load by perf.
5) Get power consumption and throughput by amd_pstate_trace.py.
6) Analyse test results and save it in file selftest.tbench.csv. 
7) Plot png images about performance, energy and performance per watt
for each test.

Third, add gitsource.sh trigger the gitsource testing and monitor the cpu
information.
1) Download and tar gitsource codes.
2) Run gitsource benchmark on specific governors, ondemand or schedutil.
3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver.
4) Get desire performance, frequency, load by perf.
5) Get power consumption and throughput by amd_pstate_trace.py.
6) Get run time by /usr/bin/time.
7) Analyse test results and save it in file selftest.gitsource.csv. 
8) Plot png images about time, energy and performance per watt
for each test.

Finally, modify rst document to introduce test steps and results etc.

See patch series in below git repo:
V1:https://lore.kernel.org/lkml/20220706073622.672135-1-li.meng@amd.com/
V2:https://lore.kernel.org/lkml/20220804054414.1510764-1-li.meng@amd.com/

Changes from V1->V2:
- selftests: amd-pstate: basic
- - delete main.sh and merge funtions into run.sh
- selftests: amd-pstate: tbench
- - modify ppw to performance per watt for tbench.
- - add comments for performance per watt for tbench.
- - add comparative test on acpi-cpufreq for tbench.
- - calculate drop between amd-pstate and acpi-cpufreq etc.
- - plot images about perfrmance,energy and ppw for tbench.
- selftests: amd-pstate: gitsource
- - modify ppw to performance per watt for gitsource.
- - add comments for performance per watt for gitsource.
- - add comparative test on acpi-cpufreq for gitsource.
- - calculate drop between amd-pstate and acpi-cpufreq etc.
- - plot images about perfrmance,energy and ppw for gitsource.
- Documentation: amd-pstate:
- - modify rst doc, introduce comparative test etc.

Changes from V2->V3:
- selftests: amd-pstate:
- - reduce print logs for governor.
- - add a check to see if tbench and the perf tools are already installed.
- - install tbench package from apt or yum.
- - correct spelling errors from comprison to comparison.

Thanks, 
Jasmine 

Meng Li (4):
  selftests: amd-pstate: Modify amd-pstate-ut.sh to basic.sh.
  selftests: amd-pstate: Trigger tbench benchmark and test cpus
  selftests: amd-pstate: Trigger gitsource benchmark and test cpus
  Documentation: amd-pstate: Add tbench and gitsource test introduction

 Documentation/admin-guide/pm/amd-pstate.rst   | 192 ++++++++-
 tools/testing/selftests/amd-pstate/Makefile   |  11 +-
 .../selftests/amd-pstate/amd-pstate-ut.sh     |  56 ---
 tools/testing/selftests/amd-pstate/basic.sh   |  38 ++
 .../testing/selftests/amd-pstate/gitsource.sh | 345 ++++++++++++++++
 tools/testing/selftests/amd-pstate/run.sh     | 387 ++++++++++++++++++
 tools/testing/selftests/amd-pstate/tbench.sh  | 334 +++++++++++++++
 7 files changed, 1287 insertions(+), 76 deletions(-)
 delete mode 100755 tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
 create mode 100755 tools/testing/selftests/amd-pstate/basic.sh
 create mode 100755 tools/testing/selftests/amd-pstate/gitsource.sh
 create mode 100755 tools/testing/selftests/amd-pstate/run.sh
 create mode 100755 tools/testing/selftests/amd-pstate/tbench.sh

Comments

Huang Rui Oct. 17, 2022, 5:34 a.m. UTC | #1
On Mon, Oct 17, 2022 at 10:34:18AM +0800, Huang Rui wrote:
> On Wed, Sep 14, 2022 at 02:11:01PM +0800, Meng, Li (Jassmine) wrote:
> > Hi all:
> > 
> > First, we modify amd-pstate-ut.sh to basic.sh as a basic test, mainly for
> > AMD P-State kernel drivers. The purpose of this modification is to
> > facilitate the subsequent addition of gitsource, tbench and other tests.
> > You can test specific functions by specifying test cases.
> > Default test all cases, include basic, tbench and gitsource etc.
> > 
> > Secondly, add tbench.sh trigger the tbench testing and monitor the cpu
> > information.
> > 1) Download and install tbench codes.
> > 2) Run tbench benchmark on specific governors, ondemand or schedutil.
> > 3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver.
> > 4) Get desire performance, frequency, load by perf.
> > 5) Get power consumption and throughput by amd_pstate_trace.py.
> > 6) Analyse test results and save it in file selftest.tbench.csv. 
> > 7) Plot png images about performance, energy and performance per watt
> > for each test.
> > 
> > Third, add gitsource.sh trigger the gitsource testing and monitor the cpu
> > information.
> > 1) Download and tar gitsource codes.
> > 2) Run gitsource benchmark on specific governors, ondemand or schedutil.
> > 3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver.
> > 4) Get desire performance, frequency, load by perf.
> > 5) Get power consumption and throughput by amd_pstate_trace.py.
> > 6) Get run time by /usr/bin/time.
> > 7) Analyse test results and save it in file selftest.gitsource.csv. 
> > 8) Plot png images about time, energy and performance per watt
> > for each test.
> > 
> 
> The cover letter won't be included into kernel commit. Above steps
> are even clearer than the original patch commit message. So I suggest you
> can move them into related commit log.
> 
> TBench steps -> Patch 2
> Gitsource steps -> Patch 3
> 
> Thanks,
> Ray
> 
> > Finally, modify rst document to introduce test steps and results etc.
> > 
> > See patch series in below git repo:
> > V1:https://lore.kernel.org/lkml/20220706073622.672135-1-li.meng@amd.com/
> > V2:https://lore.kernel.org/lkml/20220804054414.1510764-1-li.meng@amd.com/
> > 
> > Changes from V1->V2:
> > - selftests: amd-pstate: basic
> > - - delete main.sh and merge funtions into run.sh
> > - selftests: amd-pstate: tbench
> > - - modify ppw to performance per watt for tbench.
> > - - add comments for performance per watt for tbench.
> > - - add comparative test on acpi-cpufreq for tbench.
> > - - calculate drop between amd-pstate and acpi-cpufreq etc.
> > - - plot images about perfrmance,energy and ppw for tbench.
> > - selftests: amd-pstate: gitsource
> > - - modify ppw to performance per watt for gitsource.
> > - - add comments for performance per watt for gitsource.
> > - - add comparative test on acpi-cpufreq for gitsource.
> > - - calculate drop between amd-pstate and acpi-cpufreq etc.
> > - - plot images about perfrmance,energy and ppw for gitsource.
> > - Documentation: amd-pstate:
> > - - modify rst doc, introduce comparative test etc.
> > 
> > Changes from V2->V3:
> > - selftests: amd-pstate:
> > - - reduce print logs for governor.
> > - - add a check to see if tbench and the perf tools are already installed.
> > - - install tbench package from apt or yum.
> > - - correct spelling errors from comprison to comparison.
> > 

The series overall look good for me, only very a few comments. Thanks!

Could we please send V4 to address them?

Thanks,
Ray