From: xiangyu.chen@eng.windriver.com
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-Core][master][kirkstone][PATCH V2] rng-tools: Add Arm aarch64 CPU specific configuration to address excessive CPU usage on startup
Date: Thu, 17 Nov 2022 09:43:51 +0800 [thread overview]
Message-ID: <bb134142-7135-879e-bf46-b3ce71df2ecb@windriver.com> (raw)
In-Reply-To: <17252C632166F148.18251@lists.openembedded.org>
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
>> <xiangyu.chen@windriver.com> 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 <xiangyu.chen@windriver.com>
>>>> ---
>>>> 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.chen@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 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"
>>
>>
>>
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> 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/7175143
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [xiangyu.chen@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2022-11-17 1:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb134142-7135-879e-bf46-b3ce71df2ecb@windriver.com \
--to=xiangyu.chen@eng.windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.