From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation From: Lee Revell In-Reply-To: <20051217234305.GH2361@parisc-linux.org> References: <1134769269.2806.17.camel@tglx.tec.linutronix.de> <1134770778.2806.31.camel@tglx.tec.linutronix.de> <1134772964.2806.50.camel@tglx.tec.linutronix.de> <20051217002929.GA7151@tsunami.ccur.com> <20051217234305.GH2361@parisc-linux.org> Content-Type: text/plain Date: Sat, 17 Dec 2005 19:05:21 -0500 Message-Id: <1134864321.11227.52.camel@mindpipe> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit To: Matthew Wilcox Cc: Linus Torvalds , Steven Rostedt , Joe Korty , Thomas Gleixner , Geert Uytterhoeven , Andrew Morton , linux-arch@vger.kernel.org, Linux Kernel Development , arjan@infradead.org, Christoph Hellwig , mingo@elte.hu, Alan Cox , nikita@clusterfs.com, pj@sgi.com, dhowells@redhat.com List-ID: On Sat, 2005-12-17 at 16:43 -0700, Matthew Wilcox wrote: > On Fri, Dec 16, 2005 at 11:34:03PM -0800, Linus Torvalds wrote: > > I really can't think of any blocking kernel lock where priority > > inheritance would make _any_ sense at all. Please give me an example. > > I have a better example of something we currently get wrong that I > haven't heard any RT person worry about yet. If two tasks are sleeping > on the same semaphore, the one to be woken up will be the first one to > wait for it, not the highest-priority task. > > Obviously, this was introduced by the wake-one semantics. But how to > fix it? Should we scan the entire queue looking for the best task to > wake? Should we try to maintain the wait list in priority order? Or > should we just not care? Should we document that we don't care? ;-) It's well known that this is a problem: http://developer.osdl.org/dev/robustmutexes/src/fusyn.hg/Documentation/fusyn/fusyn-why.txt Lee