Hi,
I am looking at in cpufreq.c
__cpufreq_governor(policy, CPUFREQ_GOV_STOP); up_write(&policy->rwsem); __cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT); down_write(&policy->rwsem);
Why do we need to unlock the lock before calling CPUFREQ_GOV_POLICY_EXIT.
Wont this result in a race condition when 2 cpus are calling policy exit, one after another during governor switch?
On 30 May 2014 21:20, Sriram V vshrirama@gmail.com wrote:
I am looking at in cpufreq.c
__cpufreq_governor(policy, CPUFREQ_GOV_STOP); up_write(&policy->rwsem); __cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT); down_write(&policy->rwsem);
Why do we need to unlock the lock before calling CPUFREQ_GOV_POLICY_EXIT.
Wont this result in a race condition when 2 cpus are calling policy exit, one after another during governor switch?
There were some issues related to same lock-type being take again or something similar and so it was done to get rid of those stack dumps..