Re: Priority Inheritance Test (Real-Time Preemption)

From: john cooper
Date: Mon Nov 22 2004 - 09:41:51 EST


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@xxxxxxxxxxx
-
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/