Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation

From: Linus Torvalds
Date: Fri Dec 16 2005 - 20:00:07 EST




On Fri, 16 Dec 2005, Joe Korty wrote:
>
> The Mars Pathfinder incident is sufficient proof that some solution to
> the priority inversion problem is required in real systems.

Ehh.

The Mars Pathfinder is just about the worst case "real system", and if I
recall correctly, the reason it was able to continue was _not_ because it
handled priority inversion, but because it reset itself every 24 hours or
something like that, and had debugging facilities..

The _real_ lesson you should take away from it is not that priority
inheritance is a good solution to priority inversion, but that having a
failsafe switch when everthing goes wrong is critical. You don't know
_what_ bug you'll encounter.

The bug itself could have been solved without priority inheritance,
although I think in this case enabling that in VxWorks was the particular
solution to the problem as being the least invasive.

Personally, I don't care what user space does. If some app wants to use
priority inheritance to solve its bugs, that's fine. But it's like
recursive locks: it's generally a _bandaid_ for bad locking. I definitely
don't want the kernel depending on either.

So put a watchdog on your critical systems, and make sure you can debug
them. Especially if they're on Mars.

Linus
-
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/