Skip to content

Commit e46adc9

Browse files
shiva-ticshilwant
authored andcommitted
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 ebc3748 commit e46adc9

File tree

4 files changed

+44
-28
lines changed

4 files changed

+44
-28
lines changed

source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ 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.
69-
70-
More information on switching to the PRNG drivers can be found in the
71-
Foundational Components section, here :ref:`building-optee-with-prng`
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+
that 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.
70+
71+
The Linux TRNG driver can mitigate these latency spikes. This involves
72+
enabling the Pseudo RNG driver in OP-TEE as documented in the Foundational
73+
Components section: :ref:`building-optee-with-prng`, and enabling the RNG
74+
node in the Linux kernel device tree. This way the HW TRNG is accessed from
75+
the kernel itself.
7276

7377
.. csv-table::
7478
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ 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.
68-
69-
More information on switching to the PRNG drivers can be found in the
70-
Foundational Components section, here :ref:`building-optee-with-prng`
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+
that 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.
69+
70+
The Linux TRNG driver can mitigate these latency spikes. This involves
71+
enabling the Pseudo RNG driver in OP-TEE as documented in the Foundational
72+
Components section: :ref:`building-optee-with-prng`, and enabling the RNG
73+
node in the Linux kernel device tree. This way the HW TRNG is accessed from
74+
the kernel itself.
7175

7276
.. csv-table::
7377
:header: "Latencies","CPU 0","CPU 1"

source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ 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.
69-
70-
More information on switching to the PRNG drivers can be found in the
71-
Foundational Components section, here :ref:`building-optee-with-prng`
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+
that 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.
70+
71+
The Linux TRNG driver can mitigate these latency spikes. This involves
72+
enabling the Pseudo RNG driver in OP-TEE as documented in the Foundational
73+
Components section: :ref:`building-optee-with-prng`, and enabling the RNG
74+
node in the Linux kernel device tree. This way the HW TRNG is accessed from
75+
the kernel itself.
7276

7377
.. csv-table::
7478
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,17 @@ 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.
75-
76-
More information on switching to the PRNG drivers can be found in the
77-
Foundational Components section, here :ref:`building-optee-with-prng`
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+
that occurs when the kernel's hardware random number generator interface
74+
(hwrng) requests entropy from the secure TRNG to replenish the Linux entropy
75+
pool.
76+
77+
The Linux TRNG driver can mitigate these latency spikes. This involves
78+
enabling the Pseudo RNG driver in OP-TEE as documented in the Foundational
79+
Components section: :ref:`building-optee-with-prng`, and enabling the RNG
80+
node in the Linux kernel device tree. This way the HW TRNG is accessed from
81+
the kernel itself.
7882

7983
.. csv-table::
8084
:header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3"

0 commit comments

Comments
 (0)