Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758580AbYBYQcO (ORCPT ); Mon, 25 Feb 2008 11:32:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757010AbYBYQ3u (ORCPT ); Mon, 25 Feb 2008 11:29:50 -0500 Received: from 75-130-111-13.dhcp.oxfr.ma.charter.com ([75.130.111.13]:53986 "EHLO novell1.haskins.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756930AbYBYQ3s (ORCPT ); Mon, 25 Feb 2008 11:29:48 -0500 From: Gregory Haskins Subject: [(RT RFC) PATCH v2 9/9] remove the extra call to try_to_take_lock To: mingo@elte.hu, a.p.zijlstra@chello.nl, tglx@linutronix.de, rostedt@goodmis.org, linux-rt-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org, bill.huey@gmail.com, kevin@hilman.org, cminyard@mvista.com, dsingleton@mvista.com, dwalker@mvista.com, npiggin@suse.de, dsaxena@plexity.net, ak@suse.de, pavel@ucw.cz, acme@redhat.com, gregkh@suse.de, sdietrich@novell.com, pmorreale@novell.com, mkohari@novell.com, ghaskins@novell.com Date: Mon, 25 Feb 2008 11:01:23 -0500 Message-ID: <20080225160123.11268.6904.stgit@novell1.haskins.net> In-Reply-To: <20080225155959.11268.35541.stgit@novell1.haskins.net> References: <20080225155959.11268.35541.stgit@novell1.haskins.net> User-Agent: StGIT/0.12.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1160 Lines: 36 From: Peter W. Morreale Remove the redundant attempt to get the lock. While it is true that the exit path with this patch adds an un-necessary xchg (in the event the lock is granted without further traversal in the loop) experimentation shows that we almost never encounter this situation. Signed-off-by: Peter W. Morreale --- kernel/rtmutex.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index b81bbef..266ae31 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c @@ -756,12 +756,6 @@ rt_spin_lock_slowlock(struct rt_mutex *lock) spin_lock_irqsave(&lock->wait_lock, flags); init_lists(lock); - /* Try to acquire the lock again: */ - if (try_to_take_rt_mutex(lock)) { - spin_unlock_irqrestore(&lock->wait_lock, flags); - return; - } - BUG_ON(rt_mutex_owner(lock) == current); /* -- 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/