Re: [patch] Real-Time Preemption, -RT-2.6.12-rc4-V0.7.47-06

Michal Schmidt
2005-06-01T09:34:20Z

Ingo Molnar wrote:
> * Michal Schmidt <xschmi00@stud.feec.vutbr.cz> wrote:
>>I'm attaching a patch which changes a semaphore in cpufreq into a
>>completion. With this patch, my system runs OK even with cpufreqd.
>
>
> btw., could you please submit this upstream too, so that it doesnt get
> lost? Semaphore->completion conversions are desirable upstream for cases
> where the semaphore was in reality not used for mutual exclusion but for
> completion purposes. (in which case real completions are both more
> readable and slightly faster)

Yes, I'm going to contact upstream about this.
However, after closer look on cpufreq code I came to a conclusion that
the lock there doesn't really play the role of a completion. There's
always: down(), then do something with the data structure, then up() in
the same function.
I'm going to fix it differently after consulting with upstream author (I
now think that it should not be necessary to take the lock in
cpufreq_add_dev at all).

Michal