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 --- 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); -- -- 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/