Skip to content

Commit 7adc28f

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 <s-tripathi1@ti.com>
1 parent 041116c commit 7adc28f

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+
To avoid these latency spikes, the Linux TRNG driver can be used instead of
72+
the OP-TEE TRNG driver. This involves enabling the Pseudo RNG driver in OP-TEE
73+
as documented in the Foundational Components section: :ref:`building-optee-with-prng`,
74+
and enabling the RNG node in the Linux kernel device tree. This way the HW TRNG is
75+
accessed from 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+
To avoid these latency spikes, the Linux TRNG driver can be used instead of
71+
the OP-TEE TRNG driver. This involves enabling the Pseudo RNG driver in OP-TEE
72+
as documented in the Foundational Components section: :ref:`building-optee-with-prng`,
73+
and enabling the RNG node in the Linux kernel device tree. This way the HW TRNG is
74+
accessed from 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+
To avoid these latency spikes, the Linux TRNG driver can be used instead of
72+
the OP-TEE TRNG driver. This involves enabling the Pseudo RNG driver in OP-TEE
73+
as documented in the Foundational Components section: :ref:`building-optee-with-prng`,
74+
and enabling the RNG node in the Linux kernel device tree. This way the HW TRNG is
75+
accessed from 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+
To avoid these latency spikes, the Linux TRNG driver can be used instead of
78+
the OP-TEE TRNG driver. This involves enabling the Pseudo RNG driver in OP-TEE
79+
as documented in the Foundational Components section: :ref:`building-optee-with-prng`,
80+
and enabling the RNG node in the Linux kernel device tree. This way the HW TRNG is
81+
accessed from the kernel itself.
7882

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

0 commit comments

Comments
 (0)