Hi Zhoujie,
On 28 March 2013 18:42, zhoujie wu zhoujiewu@gmail.com wrote:
I found a kernel panic case caused by interactive governor when we enabled both hotplug governor and linked cpufreq features.
Below is the background and root cause, We are using the latest interactive governor on dual ca9 smp system, and linked cpufreq feature(cpumask_setall(policy->cpus) for each cpus) is enabled for them. Based on it, cpufreq governor could consider the both cpu's workload and make decision for the smp cores. And we also have a hotplug governor to monitor the system workload to make decision when will cpu1 could be hotplugged.
The default cpufreq governor during boot up is userspace.
After system is boot up, hotplug governor found system has no
workload and cpu1 was hotplugged. Hotplug notifier will set cpu0’s policy->cpus only for cpu0.
- After that, Cpufreq governor switched to Interactive, and its
CPUFREQ_GOV_START will only init the cpu0’s info struct, such as pcpu->policy and governor_enabled etc.
- A boost event comes, such as touching the screen, it will lead to
CPU1 is plugged in at first, that means cpu0’s policy->cpus is linked to cpu0&cpu1 again, but it will not call interactive governor’s CPUFREQ_GOV_START to initialize cpu1’s info struct.
What kernel version are you using? I have pushed tonnes of patches in 3.9 which must fix this issue for you. Just try with that. It should be present in latest linaro release too.
- After that cpu0’s frequency changed, and it will notify interactive
governor, in the notifier function(cpufreq_interactive_notifier) it will call update_load and access CPU1’s pcpu->policy->cur, but it is never initialized and lead to kernel panic.
Same.
But there is no such issue in b.L system as all cpu has no link
b.L? big LITTLE, right? The same issue should be present in big LITTLE systems too with hot [un]plugging.. It might not be using a governor to offline/online cpu at runtime though.
Current big LITTLE system have two clusters (A7 and A15) and ->init() is called for first cpu of both clusters and they set policy->cpus correctly.
relationship. Looks like interactive governor doesn’t consider much for SMP.
b.L. is also SMP :)
I made a draft patch to solve the panic as below, but still could solve the issue interactive is enabled after cpu1 is hotplugged. Could you please take a look how to solve the interactive governor issue for SMP?
Probably not required.