I use kernel 5.4 and latest android aosp.
But sometimes the system will hang up. And sometimes rcu info info will be shown in console, but sometimes not.
[19971.576735] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[19971.577257] rcu: 2-...0: (0 ticks this GP) idle=d0a/1/0x4000000000000000 softirq=1596658/1596658 fqs=1816
[19971.586892] (detected by 1, t=5254 jiffies, g=4113101, q=4)
[19971.592488] Task dump for CPU 2:
[19971.595680] sugov:2 R running task 0 175 2 0x0000000a
[19971.602663] Call trace:
[19971.605101] __switch_to+0x220/0x270
[19971.608630] __cpufreq_driver_target+0x3e4/0x4cc
[19971.613196] sugov_work+0x50/0x68
[19971.616474] kthread_worker_fn+0xf0/0x1b8
[19971.620437] kthread+0x134/0x150
[19971.623631] ret_from_fork+0x10/0x18
Iām planning to send this to the kernel, as while it is 100% a āhackā it also seems to be needed and the only way to solve the stall issues. Amlogic does similar in the vendor kernel and various experiments with less opp points being removed and voltages boosted etc. never seem to work.
Thanks for you reply.
I am not familiar with kernel. Could you please explain why this may solve the cpu stall issue?
Can you post some background knowledge that I can refer to?
Iād noticed the stalls while a retro-gaming derivative of the distro I work on (LibreELEC) wasnāt seeing them despite using the same kernel sources. One of the regular differences is the gaming folks force the performance governor on CPU/GPU so Iāve tried that change and seen that stalls stopped. That prompted some device-tree research in the vendor kernel where Iāve noticed Amlogic deleted the 100/250Mhz nodes, and then Iāve seen another vendor-kernel using distro deleting the 500/667MHz nodes. Testing with those removed from the upstream kernel gave the same (no stalls) result. One of the upstream kernel maintainers has suggested cpu opp-point voltage tweaks (another things Amlogic sources fiddle with) but those never resolved the issue. So the working change has been found through a tyypical combination of luck, educated guesswork, research, and a lot of trial-error testing. Iād love to have a more impressive story about analysis and diagnostics, but Iām not a coding developer so I have to fall-back onto old-school Engineering method ⦠test incremental changes and observe the system to see if you can identify differences.