Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup
@ 2022-11-01  1:48 Xiangyu Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Xiangyu Chen @ 2022-11-01  1:48 UTC (permalink / raw)
  To: openembedded-core

With the default jitter options aarch64 CPU-based devices typically experience continuous
high CPU utilisation for several minutes after rngd starts.

Accoring to the rng-tools issue #150[1] and comments[2],in order to address this,
the following configuration changes have been made, those configurations
also can be found on Alpine Linux[3]:

- reduce the number of threads used to 1 in total, rather than 1 per core.
- reduce the buffer size from 16535 to 4133 which reduces the time taken
  to fill the buffer (and so reduces the duration of CPU load).

[1] https://github.com/nhorman/rng-tools/issues/150
[2] https://github.com/nhorman/rng-tools/issues/150#issuecomment-953079212
[3] https://git.alpinelinux.org/aports/tree/main/rng-tools/rngd.confd-arm

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
Changes in V2:
  *put the aarch64 specific default file in meta/recipes-support/rng-tools/rng-tools/aarch64

---
 .../rng-tools/rng-tools/aarch64/default               | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/aarch64/default

diff --git a/meta/recipes-support/rng-tools/rng-tools/aarch64/default b/meta/recipes-support/rng-tools/rng-tools/aarch64/default
new file mode 100644
index 0000000000..5a2fbcc9ef
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/aarch64/default
@@ -0,0 +1,11 @@
+# With the default jitter options Arm CPU-based devices typically experience
+# continuous high CPU utilisation for several minutes after rngd starts.
+# See https://gitlab.alpinelinux.org/alpine/aports/-/issues/13035 and
+# https://github.com/nhorman/rng-tools/issues/150
+# In order to address this the following configuration changes have been made:
+#
+#   - reduce the number of threads used to 1 in total, rather than 1 per core.
+#   - reduce the buffer size from 16535 to 4133 which reduces the time taken
+#     to fill the buffer (and so reduces the duration of CPU load).
+#
+EXTRA_ARGS="-r /dev/hwrng -O jitter:buffer_size:4133 -O jitter:refill_thresh:4133 -O jitter:thread_count:1"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-09  6:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <172352CEDDCB35BE.6436@lists.openembedded.org>
2022-11-07  1:21 ` [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup Xiangyu Chen
2022-11-07  2:18   ` Khem Raj
2022-11-07  2:27     ` Xiangyu Chen
     [not found]     ` <17252C632166F148.18251@lists.openembedded.org>
2022-11-17  1:43       ` xiangyu.chen
2022-12-07 10:31     ` Xiangyu Chen
     [not found]     ` <172E7C34890B966B.29158@lists.openembedded.org>
2022-12-09  6:58       ` xiangyu.chen
2022-11-01  1:48 Xiangyu Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox