1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Stefan Wahren b58a36008b hwrng: bcm2835 - Fix hwrng throughput regression
The last RCU stall fix caused a massive throughput regression of the
hwrng on Raspberry Pi 0 - 3. hwrng_msleep doesn't sleep precisely enough
and usleep_range doesn't allow scheduling. So try to restore the
best possible throughput by introducing hwrng_yield which interruptable
sleeps for one jiffy.

Some performance measurements on Raspberry Pi 3B+ (arm64/defconfig):

sudo dd if=/dev/hwrng of=/dev/null count=1 bs=10000

cpu_relax              ~138025 Bytes / sec
hwrng_msleep(1000)         ~13 Bytes / sec
hwrng_yield              ~2510 Bytes / sec

Fixes: 96cb9d055445 ("hwrng: bcm2835 - use hwrng_msleep() instead of cpu_relax()")
Link: https://lore.kernel.org/linux-arm-kernel/bc97ece5-44a3-4c4e-77da-2db3eb66b128@gmx.net/
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-09-15 18:29:45 +08:00
..
2023-09-01 09:53:54 -07:00
2023-09-04 13:47:59 -07:00
2023-08-28 16:37:38 +02:00
2023-09-07 16:07:35 -07:00
2023-08-23 08:21:37 +01:00
2023-09-03 10:20:57 -07:00
2023-08-31 15:36:41 -07:00
2023-08-25 20:55:47 +02:00
2023-08-09 08:21:22 +02:00
2023-09-02 11:10:50 -07:00
2023-08-29 20:21:42 -07:00
2023-09-01 15:58:21 -07:00
2023-08-28 15:04:43 -07:00
2023-08-24 16:20:30 -07:00
2023-09-01 09:43:18 -07:00
2023-08-30 13:34:34 -07:00
2023-09-01 00:29:34 +02:00
2023-08-28 11:04:18 -07:00
2023-08-31 12:47:15 +02:00
2023-09-04 11:26:29 -07:00
2023-08-04 11:02:46 +01:00
2023-08-29 20:21:42 -07:00
2023-09-01 16:54:25 -07:00
2023-08-05 08:18:04 -04:00
2023-08-18 10:12:10 -07:00
2023-08-15 14:57:25 -07:00
2023-08-30 09:07:09 -07:00
2023-08-18 10:18:59 -07:00
2023-08-30 13:45:05 -07:00
2023-08-31 12:20:12 -07:00
2023-08-03 15:34:36 -07:00
2023-08-18 10:12:25 -07:00
2023-08-21 14:28:45 -07:00
2023-08-30 20:23:07 -07:00
2023-08-31 12:20:12 -07:00
2023-08-12 09:18:47 -07:00
2023-09-02 15:17:33 -07:00
2023-08-30 09:07:09 -07:00
2023-08-21 13:37:26 -07:00
2023-08-31 12:20:12 -07:00
2023-08-06 08:24:55 +01:00
2023-08-07 17:55:54 +00:00
2023-09-01 16:34:25 -07:00
2023-08-11 21:12:47 +02:00
2023-08-24 13:27:47 -05:00
2023-08-21 14:52:16 +02:00
2023-08-21 13:37:27 -07:00