bcm2835-rng: Performance regression since 96cb9d055445

Stefan Wahren wahrenst at gmx.net
Fri Aug 25 04:14:55 PDT 2023


Hi,

i didn't find the time to fix the performance regression in bcm2835-rng
which affects Raspberry Pi 0 - 3, so report it at least. AFAIK the first
report about this issue was here [1] and identified the offending commit:

96cb9d055445 ("hwrng: bcm2835 - use hwrng_msleep() instead of
  cpu_relax()")

#regzbot introduced: 96cb9d055445

I was able to reproduce this issue with a Raspberry Pi 3 B+ on Linux
6.5-rc6 (arm64/defconfig).

Before:
time sudo dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 status=none

real	3m29,002s
user	0m0,018s
sys	0m0,054s

After revert:
time sudo dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 status=none

real	0m0,150s
user	0m0,028s
sys	0m0,072s

I reporting this in the hope, someone has the time to fix this. Sorry
for not reporting this earlier.

Best regards

[1] - https://github.com/raspberrypi/linux/issues/5390



More information about the linux-arm-kernel mailing list