From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Clark Williams <clark.williams@gmail.com>,
Gregory Haskins <ghaskins@novell.com>,
Linux-rt <linux-rt-users@vger.kernel.org>
Subject: [patch 6/7] rtmutex: remove useless schedule enforcement
Date: Fri, 19 Dec 2008 16:03:12 -0000 [thread overview]
Message-ID: <20081219155556.225401784@linutronix.de> (raw)
In-Reply-To: <20081219155504.735865178@linutronix.de>
[-- Attachment #1: rtmutex-remove-useless-schedule-enforcement.patch --]
[-- Type: text/plain, Size: 945 bytes --]
For !mtx the call to schedule() is forced even if the waiter is
already woken (waiter.task == NULL).
This makes no sense at all and is just waste.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/rtmutex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.24/kernel/rtmutex.c
===================================================================
--- linux-2.6.24.orig/kernel/rtmutex.c
+++ linux-2.6.24/kernel/rtmutex.c
@@ -1411,7 +1411,7 @@ rt_read_slowlock(struct rw_mutex *rwm, i
debug_rt_mutex_print_deadlock(&waiter);
- if (!mtx || waiter.task)
+ if (waiter.task)
schedule_rt_mutex(mutex);
spin_lock_irqsave(&mutex->wait_lock, flags);
@@ -1557,7 +1557,7 @@ rt_write_slowlock(struct rw_mutex *rwm,
debug_rt_mutex_print_deadlock(&waiter);
- if (!mtx || waiter.task)
+ if (waiter.task)
schedule_rt_mutex(mutex);
spin_lock_irqsave(&mutex->wait_lock, flags);
--
next prev parent reply other threads:[~2008-12-19 16:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-19 16:02 [patch 0/7] 2.6.24.7-rt24 bugfixes Thomas Gleixner
2008-12-19 16:02 ` [patch 1/7] ftrace: fix task state printout Thomas Gleixner
2008-12-19 16:25 ` Frédéric Weisbecker
2008-12-19 21:36 ` Ingo Molnar
2008-12-19 21:40 ` Thomas Gleixner
2008-12-20 13:08 ` Frédéric Weisbecker
2008-12-19 16:02 ` [patch 2/7] sched: remove useless nointeractive state Thomas Gleixner
2008-12-19 16:02 ` [patch 3/7] rtmutex: remove unused variable Thomas Gleixner
2008-12-19 16:03 ` [patch 4/7] rtmutex: unify state manipulation Thomas Gleixner
2008-12-19 18:36 ` Steven Rostedt
2008-12-19 19:40 ` Thomas Gleixner
2008-12-19 16:03 ` [patch 5/7] rtmutex: remove uber optimization Thomas Gleixner
2008-12-19 16:03 ` Thomas Gleixner [this message]
2008-12-19 16:03 ` [patch 7/7] rtmutex: prevent missed wakeups Thomas Gleixner
2008-12-19 21:22 [patch 0/7] 2.6.24.7-rt24 bugfixes V2 Thomas Gleixner
2008-12-19 21:23 ` [patch 6/7] rtmutex: remove useless schedule enforcement Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081219155556.225401784@linutronix.de \
--to=tglx@linutronix.de \
--cc=clark.williams@gmail.com \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome