diff --git a/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst index 798f6c233..1bffcca3b 100644 --- a/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst @@ -77,8 +77,8 @@ default SDK image: .. csv-table:: :header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3" - "Minimum (us)","5","5","5","5" - "Average (us)","6","6","6","6" - "Maximum (us)","31","29","30","30" + "Minimum (us)","4","4","4","5" + "Average (us)","5","5","5","5" + "Maximum (us)","35","45","34","38" .. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png index 35c25420f..09fa14da5 100644 Binary files a/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst index 5f8a17a88..90d2f3884 100644 --- a/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst @@ -36,4 +36,49 @@ https://e2e.ti.com/ or https://support.ti.com/ System Benchmarks ***************** -| +Stress-ng and Cyclic Test +========================= + +.. _RT-linux-performance: + +stress-ng (next-generation) will stress test a embedded platform in +various selectable ways. It was designed to exercise various physical +subsystems as well as the various operating system kernel interfaces. +stress-ng can also measure test throughput rates; this can be useful to +observe performance changes across different operating system or types +of hardware. + +Cyclictest is most commonly used for benchmarking RT systems. It is one +of the most frequently used tools for evaluating the relative +performance of real-time systems. Some performance tests which use +Cyclictest are System benchmarking, Latency debugging with tracing and +-approximating application performance. + +Test commands used for running stress-ng and cyclictest together + +.. code:: console + + stress-ng --cpu-method=all -c 4 & + cyclictest -m -Sp80 -D6h -h400 -i200 -M -q + +The following summarizes the latencies observed using the yocto based +default SDK image: + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEE's PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` + +.. csv-table:: + :header: "Latencies","CPU 0","CPU 1" + + "Minimum (usec)","4","4" + "Average (usec)","7","6" + "Maximum (usec)","68","72" + +.. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png index 682ff7a06..100aa3c9f 100644 Binary files a/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst index 60b522d39..c22cce316 100644 --- a/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst @@ -36,4 +36,49 @@ https://e2e.ti.com/ or https://support.ti.com/ System Benchmarks ***************** -| +Stress-ng and Cyclic Test + +.. _RT-linux-performance: + +stress-ng (next-generation) will stress test a embedded platform in various selectable ways. +It was designed to exercise various physical subsystems as well as the various +operating system kernel interfaces. stress-ng can also measure test throughput rates; +this can be useful to observe performance changes across different operating system or types of hardware. + +Cyclictest is most commonly used for benchmarking RT systems. +It is one of the most frequently used tools for evaluating the relative performance of real-time systems. +Some performance tests which use Cyclictest are System benchmarking, Latency debugging with tracing and +approximating application performance. + +Test commands used for running stress-ng and cyclictest together + +.. code:: console + + stress-ng --cpu-method=all -c 4 & + cyclictest -m -Sp80 -D6h -h400 -i200 -M -q + +The following summarizes the latencies observed using the yocto based +default SDK image + +.. note:: + + Using the OP-TEE TRNG driver can impact this benchmark's performance due to + frequent context switching between Normal World (Linux) and Secure World (OP-TEE), + that occurs when the kernel's hardware random number generator interface + (hwrng) requests entropy from the secure TRNG to replenish the Linux entropy + pool. + + The Linux TRNG driver can mitigate these latency spikes. This involves + enabling the Pseudo RNG driver in OP-TEE as documented in the Foundational + Components section: :ref:`building-optee-with-prng`, and enabling the RNG + node in the Linux kernel device tree. This way the HW TRNG is accessed from + the kernel itself. + +.. csv-table:: + :header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3" + + "Minimum (usec)","4","4","4","4" + "Average (usec)","5","5","5","5" + "Maximum (usec)","39","42","44","47" + +.. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png index 1fb208be9..279786835 100644 Binary files a/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst index 001241a97..fa654195a 100644 --- a/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst @@ -36,7 +36,52 @@ https://e2e.ti.com/ or https://support.ti.com/ System Benchmarks ***************** -| +Stress-ng and Cyclic Test +========================= + +.. _RT-linux-performance: + +stress-ng (next-generation) will stress test a embedded platform in +various selectable ways. It was designed to exercise various physical +subsystems as well as the various operating system kernel interfaces. +stress-ng can also measure test throughput rates; this can be useful to +observe performance changes across different operating system or types +of hardware. + +Cyclictest is most commonly used for benchmarking RT systems. It is one +of the most frequently used tools for evaluating the relative +performance of real-time systems. Some performance tests which use +Cyclictest are System benchmarking, Latency debugging with tracing and +-approximating application performance. + +Test commands used for running stress-ng and cyclictest together + +.. code:: console + + stress-ng --cpu-method=all -c 4 & + cyclictest -m -Sp80 -D6h -h400 -i200 -M -q + +The following summarizes the latencies observed using the yocto based +default SDK image: + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEE's PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` + +.. csv-table:: + :header: "Latencies","CPU 0","CPU 1" + + "Minimum (usec)","5","5" + "Average (usec)","7","8" + "Maximum (usec)","69","77" + +.. image:: img/rt-cpu-method-all-latency-histogram.png LMBench ======= diff --git a/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png index 9e4ec1a16..b2e18b191 100644 Binary files a/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png differ