diff mbox series

[V3,2/2] Documentation: amd-pstate: Add speedometer test introduction

Message ID 20230331082659.1887946-3-li.meng@amd.com
State New
Headers show
Series Add speedometer new test cases for amd-pstate-ut | expand

Commit Message

Meng, Li (Jassmine) March 31, 2023, 8:26 a.m. UTC
Introduce speedometer 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 | 88 +++++++++++++++++++--
 1 file changed, 81 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
index 6e5298b521b1..d0158128a0a3 100644
--- a/Documentation/admin-guide/pm/amd-pstate.rst
+++ b/Documentation/admin-guide/pm/amd-pstate.rst
@@ -517,6 +517,23 @@  Unit Tests for amd-pstate
         The specified governor is ondemand or schedutil.
         Gitsource can also be tested on the ``acpi-cpufreq`` kernel driver for comparison.
 
+    4). Speedometer test
+
+        Test and monitor the cpu changes when running speedometer benchmark under the specified governor.
+        These changes include desire performance, frequency, load, time, energy etc.
+        The specified governor is ondemand or schedutil.
+        Speedometer can also be tested on the ``acpi-cpufreq`` kernel driver for comparison.
+
+#. Preparations before tests
+
+    1). Speedometer
+
+     + Python version 3.0.x or higher
+     + Install chromium-browser
+     + Install chromium-chromedriver
+     + Install selenium on the client
+     + Install selenium-server on the server
+
 #. How to execute the tests
 
    We use test module in the kselftest frameworks to implement it.
@@ -536,7 +553,7 @@  Unit Tests for amd-pstate
         + make perf ::
 
             $ cd tools/perf/
-            $ make
+            $ make && make install
 
 
     2). Installation & Steps ::
@@ -548,11 +565,14 @@  Unit Tests for amd-pstate
     3). Specified test case ::
 
         $ cd ~/kselftest/amd-pstate
-        $ sudo ./run.sh -t basic
-        $ sudo ./run.sh -t tbench
-        $ sudo ./run.sh -t tbench -m acpi-cpufreq
-        $ sudo ./run.sh -t gitsource
-        $ sudo ./run.sh -t gitsource -m acpi-cpufreq
+        $ sudo ./run.sh -c basic
+        $ sudo ./run.sh -c tbench
+        $ sudo ./run.sh -c tbench -m acpi-cpufreq
+        $ sudo ./run.sh -c gitsource
+        $ sudo ./run.sh -c gitsource -m acpi-cpufreq
+        $ ./selenium_server.sh
+        $ sudo ./run.sh -c speedometer
+        $ sudo ./run.sh -c speedometer -m acpi-cpufreq
         $ ./run.sh --help
         ./run.sh: illegal option -- -
         Usage: ./run.sh [OPTION...]
@@ -561,7 +581,8 @@  Unit Tests for amd-pstate
                 [-c <all: All testing,
                      basic: Basic testing,
                      tbench: Tbench testing,
-                     gitsource: Gitsource testing.>]
+                     gitsource: Gitsource testing,
+                     speedometer: Speedometer testing.>]
                 [-t <tbench time limit>]
                 [-p <tbench process number>]
                 [-l <loop times for tbench>]
@@ -687,6 +708,59 @@  Unit Tests for amd-pstate
          + acpi-cpufreq-schedutil VS amd-pstate-schedutil  | Comprison(%) |          |          |          | 2.1115      | 4.2873  | -4.1110              |
          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
 
+        + speedometer
+
+         When you finish test, you will get selftest.speedometer.csv and png images.
+         The selftest.speedometer.csv file contains the raw data and the drop of the comparative test.
+         The png images shows the goal, time, energy and performan per watt of each test.
+         Open selftest.speedometer.csv :
+
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + Governor                                        | Round        | Des-perf | Freq     | Load     | Goal        | Time        | Energy  | Performance Per Watt |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + Unit                                            |              |          | GHz      |          | Runs/Minute | s           | J       | Runs/w               |
+         +=================================================+==============+==========+==========+==========+=============+=============+=========+======================+
+         + acpi-cpufreq-ondemand                           | 1            |          |          |          | 209         | 51          | 731.84  | 0.2427               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-ondemand                           | 2            |          |          |          | 205         | 51          | 759.03  | 0.2295               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-ondemand                           | 3            |          |          |          | 206         | 51          | 755.15  | 0.2318               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-ondemand                           | Average      |          |          |          | 206.667     | 51          | 748.673 | 0.2346               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-schedutil                          | 1            |          |          |          | 206         | 56          | 775.08  | 0.248                |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-schedutil                          | 2            |          |          |          | 204         | 51          | 762.06  | 0.2275               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-schedutil                          | 3            |          |          |          | 207         | 56          | 776.35  | 0.2488               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-schedutil                          | Average      |          |          |          | 205.667     | 54.3333     | 771.163 | 0.2415               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-ondemand                             | 1            | 24.7974  | 1.73142  | 7.71728  | 195         | 64          | 756.6   | 0.2749               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-ondemand                             | 2            | 26.1653  | 1.91492  | 8.5525   | 195         | 51          | 705.67  | 0.2348               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-ondemand                             | 3            | 24.1789  | 1.69516  | 7.41152  | 196         | 65          | 758.98  | 0.2797               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-ondemand                             | Average      | 25.0472  | 1.7805   | 7.89377  | 195.333     | 60          | 740.417 | 0.2638               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-schedutil                            | 1            | 67.0214  | 2.76691  | 17.1314  | 197         | 51          | 737.52  | 0.227                |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-schedutil                            | 2            | 64.3032  | 2.75981  | 16.1196  | 198         | 55          | 763.57  | 0.2376               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-schedutil                            | 3            | 65.5175  | 2.59423  | 17.0067  | 201         | 51          | 735.96  | 0.2321               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-schedutil                            | Average      | 65.614   | 2.70698  | 16.7526  | 198.667     | 52.3333     | 745.683 | 0.2323               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-ondemand VS acpi-cpufreq-schedutil | Comprison(%) |          |          |          | -0.4838     | 6.5358      | 3.0039  | 2.9411               |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + amd-pstate-ondemand VS amd-pstate-schedutil     | Comprison(%) | 161.9614 | 52.0348  | 112.2255 | 1.7068      | -12.7778    | 0.7112  | -11.9408             |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-ondemand VS amd-pstate-ondemand    | Comprison(%) |          |          |          | -5.4841     | 17.647      | -1.1027 | 12.4467              |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+         + acpi-cpufreq-schedutil VS amd-pstate-schedutil  | Comprison(%) |          |          |          | -3.4035     | -3.6809     | -3.3041 | -3.8095              |
+         +-------------------------------------------------+--------------+----------+----------+----------+-------------+-------------+---------+----------------------+
+
 Reference
 ===========