Created attachment 208621 [details] the output of lspci -v -v On my computer (ubuntu/low latency mainline kernel) after suspending the computter several times sometimes the process ath9k-hwrng starts using 100% of one cpu core. I assume it to be a kernel process and I hope that ath9k is a wireless thing. I know how to compile a kernel and how to apply patches => if you tell me what to debug I will try to do it. my /proc/version file reads: Linux version 4.5.0-040500rc7-lowlatency (kernel@gloin) (gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) ) #201603061830 SMP PREEMPT Sun Mar 6 23:36:03 UTC 2016 Kind regards, Gunter.
Always 100% or just for a while ? Thanks, Miaoqing
Seems like it is constant. But I have to apologize: Did misread the output. It definitively is <100%: Am using a Core I7 Ultra Low Voltage (2 Cpus + Hyperthreading) and top tells me it is constant 12,5% that stays constant until ly the accumulator is empty; Am not completely sure if the trigger really is suspending the system, too: Did only realize that this processs is using CPU power because sometimes on my way to work the computer is running out of battery faster than usual - and until now I never encountered the issue when the computer was connected to its power supply at home (and therefore had no need go into suspend mode when I change busses/trains).
This time nearly everything I was convinced to know about this bug when reporting it has proven wrong afterwards: This time the process started using 12,5% CPU even if didn't suspend my computer. What I did was: - connecting to my mobile phone using bluetooth - started thunderbird - started a terminal with top - started firefox Will keep top open in order to investigate further.
Created attachment 209021 [details] patch
Try the attached patch, If no valid ADC randomness output, ath9k rng will continuously reading ADC, which will cause high CPU load. So increase the delay to wait for ADC ready.
This time my last few tries to compile the new kernel for Ubuntu did fail. But I haven't given up and will report my results as soon as I succeed.
Did revert from git to 4.5 hoping that this version will compile. drivers/net/wireless/ath/ath9k/rng.c: In function ‘ath9k_rng_delay_get’: drivers/net/wireless/ath/ath9k/rng.c:61:3: error: ‘delay’ undeclared (first use in this function) delay = 10; ^ Added the following declaration to the function: u32 delay; Let's see if it compiles now.
Good news everyone: It took more time than I expected until I managed to apply the patch and to compile and install the kernel. I wanted to apologize for that, again. But since then I have no more encountered the problem that ath9k-hwrng uses a considerable amout of CPU power. Normally I encountered the problem daily until then and normally less than 10 minutes into my typical work => I am convinced that the patch has solved the problem and thank you a lot for solving the issue this quick. Is there anything I need to do before the patch can enter the official kernel? Kind regards, Gunter.
Thanks Gunter, I will upstream the patch.