On Thu, Mar 24, 2011 at 8:39 PM, Steven Rostedt <rost...@goodmis.org> wrote: > > But now, mutex_trylock(B) becomes a spinner too, and since the B's owner > is running (spinning on A) it will spin as well waiting for A's owner to > release it. Unfortunately, A's owner is also spinning waiting for B to > release it. > > If both A and B's owners are real time tasks, then boom! deadlock.
Hmm. I think you're right. And it looks pretty fundamental - I don't see any reasonable approach to avoid it. I think the RT issue is a red herring too - afaik, you can get a deadlock with two perfectly normal processes too. Of course, for non-RT tasks, any other process will eventually disturb the situation and you'd get kicked out due to need_resched(), but even that might be avoided for a long time if there are other CPU's - leading to tons of wasted CPU time. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html