Re: [BUG] While changing the cpufreq governor, kernel hits a bug in workqueue.c

From: Johannes Weiner
Date: Tue Aug 12 2008 - 17:45:31 EST


Johannes Weiner <hannes@xxxxxxxxxxxx> writes:

> Hi Nageswara,
>
> Nageswara R Sastry <rnsastry@xxxxxxxxxxxxxxxxxx> writes:
>
>> Any updates on this bug.
>
> Sorry. I was just looking into it again and still see no resolution.
> Added Venkatesh and Alexey to CC.

Sorry, wrong address for Alexey. Hope this one works.

> To summarize again:
>
> The problem we have is that cpufreq_ondemand has a self-rearming worker
> function which we should but can not cancel synchroneously with the
> current code. The locking order is like this:
>
> store()
> policy_rwsem write
> cpufreq_governor_dbs()
> dbs_mutex
>
> work lock
> do_dbs_timer()
> policy_rwsem write
>
> which gives a locking hierarchy of:
>
> work lock
> policy_rwsem
> dbs_mutex
>
> Now, we _should_ cancel the worker synchroneously, but that won't fly
> since when cpufreq_governor_dbs() is called, we already hold
> policy_rwsem and grabbing the work lock is illegal.
>
> I will continue to read code and see if I can come up with a solution,
> but any help is really appreciated.
>
> I have not yet looked at cpufreq_conservative...
>
>> Thanks and Regards
>> R.Nageswara Sastry
>
> Thanks for your patience and insistence,
>
> Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/