[ath9k-devel] ath9k-rng: high cpu load

miaoqing at codeaurora.org <[email protected]>
Newsgroups org.ath9k.lists.ath9k-devel
Message-ID <[email protected]>
Hi Oleksij,

Please try the attached patch. No valid ADC randomness will cause the issue.

--
Regards,
Miaoqing


> Hallo all,
>
> on my last train trip i noticed that ath9k-rng produce continuous 15%
> cpu load. Probably two factor coused this issue:
> - my STA was not associated with any AP
> - on the road there is enough noise.
>
> from why i see, this code has all reasons to consume all CPU time it
> get, so far ath9k_rng_data_read can provide some data.
>
>         while (!kthread_should_stop()) {
>                 bytes_read = ath9k_rng_data_read(sc, rng_buf,
>                                                  ATH9K_RNG_BUF_SIZE);
>                 if (unlikely(!bytes_read)) {
>                         msleep_interruptible(10);
>                         continue;
>                 }
>
>                 /* sleep until entropy bits under write_wakeup_threshold
> */
>                 add_hwgenerator_randomness((void *)rng_buf, bytes_read,
>                                            ATH9K_RNG_ENTROPY(bytes_read));
>         }
>
> --
> Regards,
> Oleksij
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ath9k-fix-rng-high-cpu-load.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20160311/368c945e/attachment-0001.patch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.