Skip to content

Commit bd2147e

Browse files
committed
fix(rt-linux): Improve RT-Linux Performance Guide
Add more details on RT-Linux latency spike observed while running system benchmark tests due to OP-TEE TRNG. Add workarounds that can be used to avoid it. Signed-off-by: Shiva Tripathi <[email protected]>
1 parent 041116c commit bd2147e

File tree

4 files changed

+50
-24
lines changed

4 files changed

+50
-24
lines changed

source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,20 @@ default SDK image:
6262

6363
.. note::
6464

65-
A known issue in this SDK release is affecting this benchmark.
66-
Using OP-TEEs PRNG drivers rather than the hardware accelerated
67-
TRNG drivers restores the context switch latencies to the values you
68-
see here.
65+
Using the OP-TEE TRNG driver can impact this benchmark's performance due to
66+
frequent context switching between Normal World (Linux) and Secure World (OP-TEE),
67+
which occurs when the kernel's hardware random number generator interface
68+
(hwrng) requests entropy from the secure TRNG to replenish the Linux entropy
69+
pool.
6970

70-
More information on switching to the PRNG drivers can be found in the
71-
Foundational Components section, here :ref:`building-optee-with-prng`
71+
The alternatives that can be taken to avoid the above latency spikes are:
72+
73+
- Instead of TRNG, use the Software PRNG driver in OP-TEE. More information
74+
on switching to the PRNG driver can be found in the Foundational
75+
Components section: :ref:`building-optee-with-prng`
76+
77+
- Use a Linux Kernel-based TRNG driver, which involves disabling TRNG
78+
in OP-TEE and enabling the RNG node in the Kernel device tree
7279

7380
.. csv-table::
7481
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,20 @@ default SDK image:
6161

6262
.. note::
6363

64-
A known issue in this SDK release is affecting this benchmark.
65-
Using OP-TEEs PRNG drivers rather than the hardware accelerated TRNG
66-
drivers restores the context switch latencies to the values you see
67-
here.
64+
Using the OP-TEE TRNG driver can impact this benchmark's performance due to
65+
frequent context switching between Normal World (Linux) and Secure World (OP-TEE),
66+
which occurs when the kernel's hardware random number generator interface
67+
(hwrng) requests entropy from the secure TRNG to replenish the Linux entropy
68+
pool.
6869

69-
More information on switching to the PRNG drivers can be found in the
70-
Foundational Components section, here :ref:`building-optee-with-prng`
70+
The alternatives that can be taken to avoid the above latency spikes are:
71+
72+
- Instead of TRNG, use the Software PRNG driver in OP-TEE. More information
73+
on switching to the PRNG driver can be found in the Foundational
74+
Components section: :ref:`building-optee-with-prng`
75+
76+
- Use a Linux Kernel-based TRNG driver, which involves disabling TRNG
77+
in OP-TEE and enabling the RNG node in the Kernel device tree
7178

7279
.. csv-table::
7380
:header: "Latencies","CPU 0","CPU 1"

source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ default SDK image
6262

6363
.. note::
6464

65-
A known issue in this SDK release is affecting this benchmark.
66-
Using OP-TEEs PRNG drivers rather than the hardware accelerated TRNG
67-
drivers restores the context switch latencies to the values you see
68-
here.
65+
Using the OP-TEE TRNG driver can impact this benchmark's performance due to
66+
frequent context switching between Normal World (Linux) and Secure World (OP-TEE),
67+
which occurs when the kernel's hardware random number generator interface
68+
(hwrng) requests entropy from the secure TRNG to replenish the Linux entropy pool.
6969

70-
More information on switching to the PRNG drivers can be found in the
71-
Foundational Components section, here :ref:`building-optee-with-prng`
70+
The alternatives that can be taken to avoid the above latency spikes are:
71+
72+
- Instead of TRNG, use the Software PRNG driver in OP-TEE. More information
73+
on switching to the PRNG driver can be found in the Foundational
74+
Components section: :ref:`building-optee-with-prng`
75+
76+
- Use a Linux Kernel-based TRNG driver, which involves disabling TRNG
77+
in OP-TEE and enabling the RNG node in the Kernel device tree
7278

7379
.. csv-table::
7480
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,19 @@ default SDK image using the SK-AM62B-P1_ reference board:
6868

6969
.. note::
7070

71-
A known issue in this SDK release is affecting this benchmark.
72-
Using OP-TEE's PRNG drivers rather than the hardware accelerated TRNG
73-
drivers restores the context switch latencies to the values you see
74-
here.
71+
Using the OP-TEE TRNG driver can impact this benchmark's performance due to
72+
frequent context switching between Normal World (Linux) and Secure World (OP-TEE),
73+
which occurs when the kernel's hardware random number generator interface
74+
(hwrng) requests entropy from the secure TRNG to replenish the Linux entropy pool.
7575

76-
More information on switching to the PRNG drivers can be found in the
77-
Foundational Components section, here :ref:`building-optee-with-prng`
76+
The alternatives that can be taken to avoid the above latency spikes are:
77+
78+
- Instead of TRNG, use the Software PRNG driver in OP-TEE. More information
79+
on switching to the PRNG driver can be found in the Foundational
80+
Components section: :ref:`building-optee-with-prng`
81+
82+
- Use a Linux Kernel-based TRNG driver, which involves disabling TRNG
83+
in OP-TEE and enabling the RNG node in the Kernel device tree
7884

7985
.. csv-table::
8086
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

0 commit comments

Comments
 (0)