public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Meng, Li (Jassmine)" <Li.Meng@amd.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Fontenot, Nathan" <Nathan.Fontenot@amd.com>,
	"Sharma, Deepak" <Deepak.Sharma@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Limonciello, Mario" <Mario.Limonciello@amd.com>,
	"Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>,
	"Yuan, Perry" <Perry.Yuan@amd.com>,
	"Du, Xiaojian" <Xiaojian.Du@amd.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Borislav Petkov <bp@alien8.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1 4/4] Documentation: amd-pstate: Add tbench and gitsource test introduction
Date: Mon, 18 Jul 2022 17:16:09 +0800	[thread overview]
Message-ID: <YtUk2YkYvHapgQXA@amd.com> (raw)
In-Reply-To: <20220706073622.672135-5-li.meng@amd.com>

On Wed, Jul 06, 2022 at 03:36:22PM +0800, Meng, Li (Jassmine) wrote:
> Introduce tbench and gitsource test cases design and implementation.
> Monitor cpus changes about performance and power consumption etc.
> 
> Signed-off-by: Meng Li <li.meng@amd.com>
> ---
>  Documentation/admin-guide/pm/amd-pstate.rst | 124 +++++++++++++++++---
>  1 file changed, 106 insertions(+), 18 deletions(-)
> 
> diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
> index 8f3d30c5a0d8..48fb488e000e 100644
> --- a/Documentation/admin-guide/pm/amd-pstate.rst
> +++ b/Documentation/admin-guide/pm/amd-pstate.rst
> @@ -409,37 +409,53 @@ Unit Tests for amd-pstate
>  
>  1. Test case decriptions
>  
> +    1). basic tests
> +
> +        Test prerequisite and basic functions for the ``amd-pstate`` driver.
> +
>          +---------+--------------------------------+------------------------------------------------------------------------------------+
>          | Index   | Functions                      | Description                                                                        |
>          +=========+================================+====================================================================================+
> -        | 0       | amd_pstate_ut_acpi_cpc_valid   || Check whether the _CPC object is present in SBIOS.                                |
> +        | 1       | amd_pstate_ut_acpi_cpc_valid   || Check whether the _CPC object is present in SBIOS.                                |
>          |         |                                ||                                                                                   |
>          |         |                                || The detail refer to `Processor Support <processor_support_>`_.                    |
>          +---------+--------------------------------+------------------------------------------------------------------------------------+
> -        | 1       | amd_pstate_ut_check_enabled    || Check whether AMD P-State is enabled.                                             |
> +        | 2       | amd_pstate_ut_check_enabled    || Check whether AMD P-State is enabled.                                             |
>          |         |                                ||                                                                                   |
>          |         |                                || AMD P-States and ACPI hardware P-States always can be supported in one processor. |
>          |         |                                | But AMD P-States has the higher priority and if it is enabled with                 |
>          |         |                                | :c:macro:`MSR_AMD_CPPC_ENABLE` or ``cppc_set_enable``, it will respond to the      |
>          |         |                                | request from AMD P-States.                                                         |
>          +---------+--------------------------------+------------------------------------------------------------------------------------+
> -        | 2       | amd_pstate_ut_check_perf       || Check if the each performance values are reasonable.                              |
> +        | 3       | amd_pstate_ut_check_perf       || Check if the each performance values are reasonable.                              |
>          |         |                                || highest_perf >= nominal_perf > lowest_nonlinear_perf > lowest_perf > 0.           |
>          +---------+--------------------------------+------------------------------------------------------------------------------------+
> -        | 3       | amd_pstate_ut_check_freq       || Check if the each frequency values and max freq when set support boost mode       |
> +        | 4       | amd_pstate_ut_check_freq       || Check if the each frequency values and max freq when set support boost mode       |
>          |         |                                | are reasonable.                                                                    |
>          |         |                                || max_freq >= nominal_freq > lowest_nonlinear_freq > min_freq > 0                   |
>          |         |                                || If boost is not active but supported, this maximum frequency will be larger than  |
>          |         |                                | the one in ``cpuinfo``.                                                            |
>          +---------+--------------------------------+------------------------------------------------------------------------------------+
>  
> +    2). Tbench test
> +
> +        Testing and monitor the cpu changes when running tbench benchmark under the specified governor.

Test and monior ...

> +        These changes include desire performance, frequency, load, performance, energy etc.
> +        The specified governor is ondemand or schedutil.
> +
> +    3). Gitsource test
> +
> +        Testing and monitor the cpu changes when running gitsource benchmark under the specified governor.
> +        These changes include desire performance, frequency, load, time, energy etc.
> +        The specified governor is ondemand or schedutil.

Test and monior ...

> +
>  #. How to execute the tests
>  
>     We use test module in the kselftest frameworks to implement it.
>     We create amd-pstate-ut module and tie it into kselftest.(for
>     details refer to Linux Kernel Selftests [4]_).
>  
> -    1. Build
> +    a. Build

Why do you update the 1 -> a here?

>  
>          + open the :c:macro:`CONFIG_X86_AMD_PSTATE` configuration option.
>          + set the :c:macro:`CONFIG_X86_AMD_PSTATE_UT` configuration option to M.
> @@ -449,23 +465,95 @@ Unit Tests for amd-pstate
>              $ cd linux
>              $ make -C tools/testing/selftests
>  
> +        + make perf ::
> +
> +            $ cd tools/perf/
> +            $ make
> +
> +
>      #. Installation & Steps ::
>  
>          $ make -C tools/testing/selftests install INSTALL_PATH=~/kselftest
> +        $ cp tools/perf/perf ~/kselftest/amd-pstate/
>          $ sudo ./kselftest/run_kselftest.sh -c amd-pstate
> -        TAP version 13
> -        1..1
> -        # selftests: amd-pstate: amd-pstate-ut.sh
> -        # amd-pstate-ut: ok
> -        ok 1 selftests: amd-pstate: amd-pstate-ut.sh
> -
> -    #. Results ::
> -
> -         $ dmesg | grep "amd_pstate_ut" | tee log.txt
> -         [12977.570663] amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid  success!
> -         [12977.570673] amd_pstate_ut: 2    amd_pstate_ut_check_enabled   success!
> -         [12977.571207] amd_pstate_ut: 3    amd_pstate_ut_check_perf      success!
> -         [12977.571212] amd_pstate_ut: 4    amd_pstate_ut_check_freq      success!
> +
> +    #. Specified test case ::
> +
> +        $ cd ~/kselftest/amd-pstate
> +        $ sudo ./run.sh -t basic
> +        $ sudo ./run.sh -t tbench
> +        $ sudo ./run.sh -t gitsource
> +        $ ./run.sh --help
> +        ./run.sh: illegal option -- -
> +        Usage: ./run.sh [OPTION...]
> +        [-h <help>]
> +        [-o <output-file-for-dump>]
> +        [-t <all:       All testing,
> +        basic:     Basic testing,
> +        tbench:    Test tbench,
> +        gitsource: Test gitsource.>]
> +        [-i <tbench time limit>]
> +        [-p <tbench process number>]
> +        [-l <loop times for tbench/gitsource]
> +        [-n <amd tracer interval]
> +
> +    4). Results

4) -> #.?

We would like to align all the number format in the paragraph like below:

1.
   1)
   2)
   3)
2.
   1)
   2)
...

Thanks,
Ray

> +
> +        + basic
> +
> +         When you finish test, you will get the following log info ::
> +
> +          $ dmesg | grep "amd_pstate_ut" | tee log.txt
> +          [12977.570663] amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid  success!
> +          [12977.570673] amd_pstate_ut: 2    amd_pstate_ut_check_enabled   success!
> +          [12977.571207] amd_pstate_ut: 3    amd_pstate_ut_check_perf      success!
> +          [12977.571212] amd_pstate_ut: 4    amd_pstate_ut_check_freq      success!
> +
> +        + tbench
> +
> +         When you finish test, you will get selftest.tbench.csv and selftest.tbench.result files form amd-pstate.
> +         Open selftest.tbench.csv :
> +
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + Governor  | Round   | Des-perf | Freq    | Load     | Performance(MB/s) | Energy(Joules) | PPW(MB/J) |
> +         +===========+=========+==========+=========+==========+===================+================+===========+
> +         + ondemand  | 1       | 203.244  | 3.2225  | 87.5064  | 35368.2           | 6626.1         | 101.4164  |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + ondemand  | 2       | 205.861  | 3.24948 | 88.9281  | 34795.7           | 6547.06        | 100.9794  |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + ondemand  | Average | 204.553  | 3.23599 | 88.2173  | 35081.9           | 6586.58        | 101.1991  |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         +           |         |          |         |          |                   |                |           |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + schedutil | 1       | 253.735  | 3.26755 | 96.6481  | 34653.9           | 6622.85        | 99.4170   |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + schedutil | 2       | 254.654  | 3.44086 | 92.3564  | 31707.8           | 6573.67        | 91.6456   |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +         + schedutil | Average | 254.195  | 3.3542  | 94.5023  | 33180.8           | 6598.26        | 95.5456   |
> +         +-----------+---------+----------+---------+----------+-------------------+----------------+-----------+
> +
> +        + gitsource
> +
> +         When you finish test, you will get selftest.gitsource.csv and selftest.gitsource.result files form amd-pstate.
> +         Open selftest.gitsource.csv :
> +
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + Governor  | Round   | Des-perf | Freq     | Load     | Times(s) | Energy(Joules) | PPW(s/J) |
> +         +===========+=========+==========+==========+==========+==========+================+==========+
> +         + ondemand  | 1       | 29.7305  | 1.13025  | 8.49585  | 341.61   | 6811.02        | 0.0501   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + ondemand  | 2       | 28.0523  | 1.33848  | 8.16496  | 339.21   | 6999.84        | 0.0484   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + ondemand  | Average | 28.8914  | 1.23436  | 8.33041  | 340.41   | 6905.43        | 0.0492   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         +           |         |          |          |          |          |                |          |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + schedutil | 1       | 29.6971  | 0.834149 | 9.57879  | 278.15   | 5992.26        | 0.0464   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + schedutil | 2       | 31.6573  | 0.99686  | 8.60513  | 280.28   | 5772.59        | 0.0485   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
> +         + schedutil | Average | 30.6772  | 0.915504 | 9.09196  | 279.215  | 5882.43        | 0.0474   |
> +         +-----------+---------+----------+----------+----------+----------+----------------+----------+
>  
>  Reference
>  ===========
> -- 
> 2.25.1
> 

      reply	other threads:[~2022-07-18  9:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  7:36 [PATCH V1 0/4] Add tbench/gitsource new test cases for amd-pstate-ut Meng Li
2022-07-06  7:36 ` [PATCH V1 1/4] selftests: amd-pstate: Modify amd-pstate-ut.sh to basic.sh Meng Li
2022-07-18 10:34   ` Huang Rui
2022-07-21 18:02   ` Nathan Fontenot
2022-07-06  7:36 ` [PATCH V1 2/4] selftests: amd-pstate: Trigger tbench benchmark and test cpus Meng Li
2022-07-19  0:15   ` Huang Rui
2022-07-06  7:36 ` [PATCH V1 3/4] selftests: amd-pstate: Trigger gitsource " Meng Li
2022-07-19  0:22   ` Huang Rui
2022-07-06  7:36 ` [PATCH V1 4/4] Documentation: amd-pstate: Add tbench and gitsource test introduction Meng Li
2022-07-18  9:16   ` Huang Rui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtUk2YkYvHapgQXA@amd.com \
    --to=ray.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Deepak.Sharma@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=Li.Meng@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Nathan.Fontenot@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=skhan@linuxfoundation.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox