rtmutex: Avoid pointless requeueing in the deadlock detection chain walk
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 May 2014 03:25:57 +0000 (03:25 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 21 Jun 2014 20:05:31 +0000 (22:05 +0200)
commit67792e2cabadbadd1a93f6790fa7bcbd47eca7c3
treeda0fbc4068e2b6ac73006f58878b036bf607d918
parent8930ed80f970a90a795239e7415c9b0e6f964649
rtmutex: Avoid pointless requeueing in the deadlock detection chain walk

In case the dead lock detector is enabled we follow the lock chain to
the end in rt_mutex_adjust_prio_chain, even if we could stop earlier
due to the priority/waiter constellation.

But once we are no longer the top priority waiter in a certain step
or the task holding the lock has already the same priority then there
is no point in dequeing and enqueing along the lock chain as there is
no change at all.

So stop the queueing at this point.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/20140522031950.280830190@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/locking/rtmutex.c