Repository navigation
Commit 45ab4ef
locking/rtmutex: Implement lockless top-waiter wakeup
Mark the task for later wakeup after the wait_lock has been released.
This way, once the next task is awoken, it will have a better chance
to of finding the wait_lock free when continuing executing in
__rt_mutex_slowlock() when trying to acquire the rtmutex, calling
try_to_take_rt_mutex(). Upon contended scenarios, other tasks attempting
take the lock may acquire it first, right after the wait_lock is released,
but (a) this can also occur with the current code, as it relies on the
spinlock fairness, and (b) we are dealing with the top-waiter anyway,
so it will always take the lock next.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1432056298-18738-2-git-send-email-dave@stgolabs.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>1 parent 6f9aad0 commit 45ab4ef
1 file changed
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
958 | | - | |
959 | | - | |
960 | 958 | | |
961 | | - | |
| 959 | + | |
962 | 960 | | |
963 | 961 | | |
964 | 962 | | |
965 | | - | |
| 963 | + | |
| 964 | + | |
966 | 965 | | |
967 | 966 | | |
968 | 967 | | |
| |||
991 | 990 | | |
992 | 991 | | |
993 | 992 | | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
| 993 | + | |
1000 | 994 | | |
1001 | 995 | | |
1002 | 996 | | |
| |||
1258 | 1252 | | |
1259 | 1253 | | |
1260 | 1254 | | |
| 1255 | + | |
| 1256 | + | |
1261 | 1257 | | |
1262 | 1258 | | |
1263 | 1259 | | |
| |||
1306 | 1302 | | |
1307 | 1303 | | |
1308 | 1304 | | |
| 1305 | + | |
| 1306 | + | |
1309 | 1307 | | |
1310 | | - | |
| 1308 | + | |
1311 | 1309 | | |
1312 | 1310 | | |
| 1311 | + | |
1313 | 1312 | | |
1314 | 1313 | | |
1315 | 1314 | | |
| |||
0 commit comments