Re: Priority Inheritance Test (Real-Time Preemption)

john cooper
2004-11-22T14:36:18Z

Bill Huey (hui) wrote:

> IMO, their needs to be statistical code in the mutex itself so that it can
> measure the frequency of PI events as well as depth of the inheritance
> chains and all data structure traversals. The problem with writing that
> stuff now is that there isn't proper priority propagation through the entire
> dependency chain in any mutex code that I've publically seen yet.> Patching
> this instrumentation in a mutex require a mutex with this built in
> functionality. IMO, PI should be considered a kind of contention overload
> condition and really a kind of fallback device to deal with these kind
> of exceptional circumstances.

I'd hazard a guess the reason existing implementations do not
do this type of dependency-chain closure is the complexity of a
general approach. Getting correct behavior and scaling on SMP
require some restrictions of how lock ownership is maintained,
otherwise fine grained locking is not possible. Another likely
reason is the fact more mechanism is getting put in place for
less likely inversion scenarios. And when those scenarios do
exist the cost of effecting promotion closure may well be
greater than allowing the priority inversions to subside.
However this point of diminishing returns is application
dependent so there is no single, simple solution.

That said I don't see anything in the current work which precludes
doing any of the above. To my eyes, the groundwork is already
in place.

-john

--
john.cooper@timesys.com