Messages in this thread | | | Date | Mon, 22 Nov 2004 13:37:41 +0100 | From | Ingo Molnar <> | Subject | Re: Priority Inheritance Test (Real-Time Preemption) |
| |
* Bill Huey <bhuey@lnxw.com> wrote:
> [...] There might be places where, if algorithmically bounded somehow, > reverting some of the heavy hammered sleeping locks back to spinlocks > would make the system faster and more controlled. rtc_lock possibly > could be one of those places and other places that are as heavily as > used as that.
in the -RT patchset one of the reasons why i've gone for the completely preemptible variant is to trigger all priority inversion problems outright. In the first variant they didnt really trigger - but they were present. Once the locks were almost all preemptible, PI problems surfaced in a big way - causing people to report them and forcing me to fix them :-)
There are lots of critical sections in Linux and we cannot design around them - so if the goal is hard-RT properties and latencies then priority inversion is a problem that has to be solved. Later on we could easily revert some of the hw-related spinlocks to raw spinlocks, and/or the known-O(1) critical sections as well.
the paper cited is not very persuasive to me though. It lists problems of an incomplete/incorrect PI implementation, and comes to the IMO false (and unrelated) conclusion that somehow PI-handling is not desired. Obviously PI makes only sense if it's implemented correctly. I think i managed to fix the problems Esben's testsuite uncovered, in the current -RT patch. Anyway, this implementation is also special in that it relies on correct SMP locking of Linux:
> Turning this into a "priority inheritance world" is just going to turn > this project into the FreeBSD SMP project [...]
i dont have any intentions to turn Linux into a 'priority inheritance world'. PI handling is only a property of the PREEMPT_RT feature intended for the most latency-sensitive applications - the main and primary critical-section model of Linux is and should still be a healthy mix of spinlocks and mutexes. Having only mutexes (or only spinlocks) is an extreme that _does_ hurt the common case. PREEMPT_RT 'only' lives on the back of SMP-Linux.
Ingo - 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/
| |