On Thu, 26 Oct 2023 10:54:14 +0200 Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > No, I wouldn't say it's the same as priority inheritance, which is to help > > with determinism and not performance. PI adds overhead but removes > > unbounded latency. On average, a non PI mutex is faster than PI mutex, but > > can suffer from unbounded priority inversion. > > Matheusz is right though, what you're asking for is a (limited) priority > ceiling, which is a very primitive form of PI, which itself is a very > specific case of proxy execution :-) > > Note that in kernel spinners have this priority ceiling by means of > preempt_disable(). > > > For this code, I took off my RT hat, and put on my performance hat. > > Seems to me you took the brain along with the hat. > > You're confusing cost of implementation with concept. Yes full blown PI > is fairly expensive, but the concept is still valid. Priority ceilings > were always an approximation. It's a very weak priority ceiling, and why I didn't associate it, as I would with preempt_disable() in the kernel (and I have mentioned in several of my talks that preempt_disable() is a PI, as it makes the running task the highest priority task on the CPU). The major difference is that this is time sensitive. That is, the kernel gives it an arbitrary amount of time to finish up. Priority ceiling is usually associated to an entire critical section. Not the start of it and if you don't finish it in time we take away that ceiling. Even proxy execution doesn't work that way. Hence, why I don't want to associate this with priority inheritance. The time constraint is a fundamental difference. -- Steve