> -----Original Message-----
> From: Roger Larsson [mailto:roger.larsson@skelleftea.mail.telia.com]
>
> On Wednesday 26 March 2003 06:23, Perez-Gonzalez, Inaky wrote:
> >
> > I am dealing with this problem and it is time to ask (read the source
> > already). I have this in the rtfutex priority inheritance code: when
> task A
> > boosts task B's priority (both FIFO), task B runs with A's priority
> until B
> > decides to stop waiting for A to finish (ie: timeout/signal).
>
> Don't you have a deadlock here?
> * A waiting for B and boosting B's priority.
> * B waiting for A to finish.
> * But A is waiting for B....
Crap! Typo in the house: should be until A decides to stop waiting for B to
finish (I should use a consistent terminology ... B was in my head the
Booster thread)
Good catch!
> * B inherits A's priority => same priority
> * B will run until
> - the B priority gets lowered (shouldn't that happen when B is releasing
> the lock A is waiting for?)
B's priority (Boosted) is lowered when B unlocks or when A stops waiting
(signal/timeout).
The former is the one causing trouble - now I get it to yield (unsing a
modification of sys_sched_yield()), but the priority does not seem to be
correctly lowered). I mean, it seems that it keep running with the same high
priority.
> Maybe B should get A's priority minus one?
No, it has to be A's ... otherwise it is cheating :)
Thanks!
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/