Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752383Ab1CYNML (ORCPT ); Fri, 25 Mar 2011 09:12:11 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:33839 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982Ab1CYNMJ (ORCPT ); Fri, 25 Mar 2011 09:12:09 -0400 X-Authority-Analysis: v=1.1 cv=aqMe+0lCtaYvy4h0jyaoPGyq+DPF+P6rPG2xbekoY9Q= c=1 sm=0 a=a_0UJ9UWJWAA:10 a=Q9fys5e9bTEA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=H1XzBolG70dieeGWJAAA:9 a=rCUgOqCiP6DwWPt0KIoH_mfRenUA:4 a=PUjeQqilurYA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Subject: Re: [PATCH 2/2] mutex: Apply adaptive spinning on mutex_trylock() From: Steven Rostedt To: Andrey Kuzmin Cc: Tejun Heo , Peter Zijlstra , Ingo Molnar , Linus Torvalds , Andrew Morton , Chris Mason , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org In-Reply-To: References: <20110323153727.GB12003@htj.dyndns.org> <20110324094119.GD12038@htj.dyndns.org> <20110324094151.GE12038@htj.dyndns.org> <20110325033956.GB9313@home.goodmis.org> Content-Type: text/plain; charset="ISO-8859-15" Date: Fri, 25 Mar 2011 09:12:07 -0400 Message-ID: <1301058727.14261.174.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 698 Lines: 17 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 -- 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/