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

From: Ingo Molnar
Date: Wed Jun 01 2005 - 04:48:26 EST



* Michal Schmidt <xschmi00@xxxxxxxxxxxxxxxxxx> 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
-
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/