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

Ingo Molnar
2005-06-01T09:45:23Z

* Michal Schmidt <xschmi00@stud.feec.vutbr.cz> wrote:

> 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).

yeah. It would lead to incorrect code to use a completion if the purpose
is a real lock. The main non-PREEMPT_RT-compatible use of semaphores is
the unlocking of a semaphore the task did not lock itself. It is correct
Linux code, so that alone is not a good reason to change upstream (and
upstream doesnt and shouldnt bother about PREEMPT_RT at this point) -
but if the underlying code is not entirely clean and the cross-owner-use
of locks is not justified it might be possible to solve this via a
cleanup.

Ingo