From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [PATCH 2/2] mutex: Apply adaptive spinning on mutex_trylock() Date: Fri, 25 Mar 2011 09:12:07 -0400 Message-ID: <1301058727.14261.174.camel@gandalf.stny.rr.com> References: <20110323153727.GB12003@htj.dyndns.org> <20110324094119.GD12038@htj.dyndns.org> <20110324094151.GE12038@htj.dyndns.org> <20110325033956.GB9313@home.goodmis.org> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Cc: Tejun Heo , Peter Zijlstra , Ingo Molnar , Linus Torvalds , Andrew Morton , Chris Mason , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org To: Andrey Kuzmin Return-path: In-Reply-To: List-ID: On Fri, 2011-03-25 at 14:13 +0300, Andrey Kuzmin wrote: > Turning try_lock into indefinitely spinning one breaks its semantics, > so deadlock is to be expected. But what's wrong in this scenario if > try_lock spins a bit before giving up? Because that will cause this scenario to spin that "little longer" always, and introduce latencies that did not exist before. Either the solution does not break this scenario, or it should not go in. -- Steve