Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-12-08 Thread Xiangyu Chen


On 12/7/22 18:31, Xiangyu Chen wrote:


On 11/7/22 10:18, Khem Raj wrote:

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


On Sun, Nov 6, 2022 at 5:21 PM Xiangyu Chen 
 wrote:


On 11/1/22 09:48, Xiangyu Chen wrote:
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 
---
Changes in V2:
    *put the aarch64 specific default file in 
meta/recipes-support/rng-tools/rng-tools/aarch64

Friendly ping. Is there any more concern on this?

My concern is that will it be so for all aarch64 machines ?

Regarding the rng-tools high cpu usage still need to be discussed here.

Currently, on some platforms like ARM, there is not any good idea to 
solve the rng-tools jitter module take full cpu load during the daemon 
start. In fact, after kernel v5.6, the /dev/random doesn't block 
anymore, so, perhaps we can use the parameter to limit rng-tools 
resource during it start up, does anyone have any ideas to propose?  
Thanks!


We have verified 2 boards on kernel 5.6 later, 1 board without rngd, 
random number was also generated in perfectly speed, sshd also was 
working well.


But in another board on kernel 5.2 without rngd, a testing random 
progress was blocked due to no enough entropy.


From the log, on kernel 5.15, we can observe that crng init in early 
stage before mounting the rootfs,but on kernel 5.2, crng init after 
rootfs was mounted, and although crng inited, the entropy still low if 
rngd not start, a dd test progress was blocked due to low entropy, 
that's explain why openssh enabled the rngd/rng-tools .


So, from the test result we can see, for newly kernel, the rngd seems 
not necessary any more.




Testing result as below:


Board 1: Marvell CN96xx CRB (Cortex A72, aarch64)

crng init stage:

oot@marvell-cn96xx:~# dmesg | grep -C 5 crng
[   88.486463] bus: 'pci': __driver_probe_device: matched device 
:03:00.1 with driver cavium_rng_vf
[   88.486513] bus: 'pci': really_probe: probing driver cavium_rng_vf 
with device :03:00.1

[   88.488911] cavium_rng_vf :03:00.1: Adding to iommu group 73
[   88.516290] cavium_rng_vf :03:00.1: assign IRQ: got 0
[   88.519205] driver: 'cavium_rng_vf': driver_bound: bound to device 
':03:00.1'
[   88.519459] bus: 'pci': really_probe: bound device :03:00.1 to 
driver cavium_rng_vf

[   88.519473] random: crng init done
[   88.519723] driver: 'cavium_rng_pf': driver_bound: bound to device 
':03:00.0'
[   88.523222] bus: 'pci': really_probe: bound device :03:00.0 to 
driver cavium_rng_pf

[   88.523295] devices_kset: Moving :01:01.4 to end of list
[   88.523320] PM: Moving pci::01:01.4 to end of list


Kernel version:

root@marvell-cn96xx:~# uname -a
Linux marvell-cn96xx 5.15.78-yocto-standard #1 SMP PREEMPT Wed Nov 23 
04:17:58 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux



Disabled rng-tools(rngd) and testing read random, we can observe almost 
20.4 MB/s random number was generated from /dev/random with dd command, 
rngtest also was working well:


root@marvell-cn96xx:~# systemctl stop rng-tools
root@marvell-cn96xx:~# ps -ef |grep rng
root 441   2  0 10:59 ?    00:00:00 [hwrng]
root 864 848  0 11:02 pts/0    00:00:00 grep rng
root@marvell-cn96xx:~# dd if=/dev/random of=/dev/null status=progress
1342177280 bytes (1.3 GB, 1.2 GiB) copied, 66 s, 20.4 MB/s
10+0 records in
10+0 records out
1342177280 bytes (1.3 GB, 1.2 GiB) copied, 65.7033 s, 20.4 MB/s
root@marvell-cn96xx:~# rngtest -c 1000 This is free software; see the source for copying conditions. There is 
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.rngtest: starting FIPS tests...

rngtest: bits received from input: 2032
rngtest: FIPS 140-2 successes: 1000
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=4.340; avg=135.364; max=146.719)Mibits/s
rngtest: FIPS tests speed: (min=8.197; avg=69.020; max=72.800)Mibits/s
rngtest: Program 

Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-12-07 Thread Xiangyu Chen


On 11/7/22 10:18, Khem Raj wrote:

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Sun, Nov 6, 2022 at 5:21 PM Xiangyu Chen  wrote:


On 11/1/22 09:48, Xiangyu Chen wrote:

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 
---
Changes in V2:
*put the aarch64 specific default file in 
meta/recipes-support/rng-tools/rng-tools/aarch64

Friendly ping. Is there any more concern on this?

My concern is that will it be so for all aarch64 machines ?

Regarding the rng-tools high cpu usage still need to be discussed here.

Currently, on some platforms like ARM, there is not any good idea to 
solve the rng-tools jitter module take full cpu load during the daemon 
start. In fact, after kernel v5.6, the /dev/random doesn't block 
anymore, so, perhaps we can use the parameter to limit rng-tools 
resource during it start up, does anyone have any ideas to propose?  Thanks!



Br,

Xiangyu





Thanks,

Xiangyu


---
   .../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 00..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"







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174348): 
https://lists.openembedded.org/g/openembedded-core/message/174348
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-11-16 Thread Xiangyu Chen


On 11/7/22 10:27, Xiangyu Chen wrote:


On 11/7/22 10:18, Khem Raj wrote:

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


On Sun, Nov 6, 2022 at 5:21 PM Xiangyu Chen 
 wrote:


On 11/1/22 09:48, Xiangyu Chen wrote:
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 
---
Changes in V2:
    *put the aarch64 specific default file in 
meta/recipes-support/rng-tools/rng-tools/aarch64

Friendly ping. Is there any more concern on this?

My concern is that will it be so for all aarch64 machines ?


Please discard this thread, we also found that the rng-tools high cpu 
usage not only on ARM64 but also on ARM32 platform(also include 
qemuarm/qemuarm64), it's a common issue on ARM platform.


A new patch has been sent to list as below link, tested in my local 
setup, thanks.



https://lists.openembedded.org/g/openembedded-core/message/173266

https://patchwork.yoctoproject.org/project/oe-core/patch/20221115081819.761176-1-xiangyu.c...@eng.windriver.com/



Thanks,

Xiangyu

I tested two aarch64 platforms on my hand, zynqmp and raspi4, the 
rng-tools behavior is the same, when service start, the jitter random 
generator would load full cpu cores load. It would cause other 
services take long time to start. I also checked another linux 
distribution, so far, only Alpine Linux processed this issue and it 
applied those configurations on all aarch64 platforms.



Thanks,

Xiangyu
Thanks,

Xiangyu


---
   .../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 00..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"











-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#173396): 
https://lists.openembedded.org/g/openembedded-core/message/173396
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-11-06 Thread Xiangyu Chen


On 11/7/22 10:18, Khem Raj wrote:

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Sun, Nov 6, 2022 at 5:21 PM Xiangyu Chen  wrote:


On 11/1/22 09:48, Xiangyu Chen wrote:

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 
---
Changes in V2:
*put the aarch64 specific default file in 
meta/recipes-support/rng-tools/rng-tools/aarch64

Friendly ping. Is there any more concern on this?

My concern is that will it be so for all aarch64 machines ?


I tested two aarch64 platforms on my hand, zynqmp and raspi4, the 
rng-tools behavior is the same, when service start, the jitter random 
generator would load full cpu cores load. It would cause other services 
take long time to start. I also checked another linux distribution, so 
far, only Alpine Linux processed this issue and it applied those 
configurations on all aarch64 platforms.



Thanks,

Xiangyu





Thanks,

Xiangyu


---
   .../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 00..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"







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172821): 
https://lists.openembedded.org/g/openembedded-core/message/172821
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-11-06 Thread Khem Raj
On Sun, Nov 6, 2022 at 5:21 PM Xiangyu Chen  wrote:
>
>
> On 11/1/22 09:48, Xiangyu Chen wrote:
> > 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 
> > ---
> > Changes in V2:
> >*put the aarch64 specific default file in 
> > meta/recipes-support/rng-tools/rng-tools/aarch64
>
> Friendly ping. Is there any more concern on this?

My concern is that will it be so for all aarch64 machines ?

>
>
> Thanks,
>
> Xiangyu
>
> > ---
> >   .../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 00..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"
> >
> >
> >
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172820): 
https://lists.openembedded.org/g/openembedded-core/message/172820
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-11-06 Thread Xiangyu Chen


On 11/1/22 09:48, Xiangyu Chen wrote:

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 
---
Changes in V2:
   *put the aarch64 specific default file in 
meta/recipes-support/rng-tools/rng-tools/aarch64


Friendly ping. Is there any more concern on this?


Thanks,

Xiangyu


---
  .../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 00..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"




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172819): 
https://lists.openembedded.org/g/openembedded-core/message/172819
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup

2022-10-31 Thread Xiangyu Chen
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 
---
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 00..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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172349): 
https://lists.openembedded.org/g/openembedded-core/message/172349
Mute This Topic: https://lists.openembedded.org/mt/94701000/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-