diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-09 18:24:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-09 18:24:03 -0500 |
| commit | 8308756f45a12e2ff4f7749c2694fc83cdef0be9 (patch) | |
| tree | 618c8f955d22927ebe73d94305d19b37c6ab65c9 /kernel/locking/rtmutex.c | |
| parent | 23e8fe2e16587494268510c1bc9f6952f50f0311 (diff) | |
| parent | afffc6c1805d98e08e778cddb644a666e78cfcfd (diff) | |
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking updates from Ingo Molnar:
"The main changes are:
- mutex, completions and rtmutex micro-optimizations
- lock debugging fix
- various cleanups in the MCS and the futex code"
* 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
locking/rtmutex: Optimize setting task running after being blocked
locking/rwsem: Use task->state helpers
sched/completion: Add lock-free checking of the blocking case
sched/completion: Remove unnecessary ->wait.lock serialization when reading completion state
locking/mutex: Explicitly mark task as running after wakeup
futex: Fix argument handling in futex_lock_pi() calls
doc: Fix misnamed FUTEX_CMP_REQUEUE_PI op constants
locking/Documentation: Update code path
softirq/preempt: Add missing current->preempt_disable_ip update
locking/osq: No need for load/acquire when acquire-polling
locking/mcs: Better differentiate between MCS variants
locking/mutex: Introduce ww_mutex_set_context_slowpath()
locking/mutex: Move MCS related comments to proper location
locking/mutex: Checking the stamp is WW only
Diffstat (limited to 'kernel/locking/rtmutex.c')
| -rw-r--r-- | kernel/locking/rtmutex.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 7c98873a3077..3059bc2f022d 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
| @@ -1130,6 +1130,7 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state, | |||
| 1130 | set_current_state(state); | 1130 | set_current_state(state); |
| 1131 | } | 1131 | } |
| 1132 | 1132 | ||
| 1133 | __set_current_state(TASK_RUNNING); | ||
| 1133 | return ret; | 1134 | return ret; |
| 1134 | } | 1135 | } |
| 1135 | 1136 | ||
| @@ -1188,10 +1189,9 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, | |||
| 1188 | ret = task_blocks_on_rt_mutex(lock, &waiter, current, chwalk); | 1189 | ret = task_blocks_on_rt_mutex(lock, &waiter, current, chwalk); |
| 1189 | 1190 | ||
| 1190 | if (likely(!ret)) | 1191 | if (likely(!ret)) |
| 1192 | /* sleep on the mutex */ | ||
| 1191 | ret = __rt_mutex_slowlock(lock, state, timeout, &waiter); | 1193 | ret = __rt_mutex_slowlock(lock, state, timeout, &waiter); |
| 1192 | 1194 | ||
| 1193 | set_current_state(TASK_RUNNING); | ||
| 1194 | |||
| 1195 | if (unlikely(ret)) { | 1195 | if (unlikely(ret)) { |
| 1196 | remove_waiter(lock, &waiter); | 1196 | remove_waiter(lock, &waiter); |
| 1197 | rt_mutex_handle_deadlock(ret, chwalk, &waiter); | 1197 | rt_mutex_handle_deadlock(ret, chwalk, &waiter); |
| @@ -1626,10 +1626,9 @@ int rt_mutex_finish_proxy_lock(struct rt_mutex *lock, | |||
| 1626 | 1626 | ||
| 1627 | set_current_state(TASK_INTERRUPTIBLE); | 1627 | set_current_state(TASK_INTERRUPTIBLE); |
| 1628 | 1628 | ||
| 1629 | /* sleep on the mutex */ | ||
| 1629 | ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter); | 1630 | ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter); |
| 1630 | 1631 | ||
| 1631 | set_current_state(TASK_RUNNING); | ||
| 1632 | |||
| 1633 | if (unlikely(ret)) | 1632 | if (unlikely(ret)) |
| 1634 | remove_waiter(lock, waiter); | 1633 | remove_waiter(lock, waiter); |
| 1635 | 1634 | ||
