summaryrefslogtreecommitdiffstats
path: root/kernel/mutex.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-07-19 01:49:00 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 10:04:49 -0700
commit96645678cd726e87ce42a0664de71e047e32bca4 (patch)
tree116f568a090414777b481e8e5d9db55f420e4335 /kernel/mutex.c
parent443aef0eddfa44c158d1b94ebb431a70638fcab4 (diff)
downloadlinux-96645678cd726e87ce42a0664de71e047e32bca4.tar.gz
linux-96645678cd726e87ce42a0664de71e047e32bca4.tar.xz
lockstat: measure lock bouncing
__acquire | lock _____ | \ | __contended | | | wait | _______/ |/ | __acquired | __release | unlock We measure acquisition and contention bouncing. This is done by recording a cpu stamp in each lock instance. Contention bouncing requires the cpu stamp to be set on acquisition. Hence we move __acquired into the generic path. __acquired is then used to measure acquisition bouncing by comparing the current cpu with the old stamp before replacing it. __contended is used to measure contention bouncing (only useful for preemptable locks) [akpm@linux-foundation.org: cleanups] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/mutex.c')
-rw-r--r--kernel/mutex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c
index 7a3f32761f26..691b86564dd9 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -180,8 +180,8 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass)
spin_lock_mutex(&lock->wait_lock, flags);
}
- lock_acquired(&lock->dep_map);
done:
+ lock_acquired(&lock->dep_map);
/* got the lock - rejoice! */
mutex_remove_waiter(lock, &waiter, task_thread_info(task));
debug_mutex_set_owner(lock, task_thread_info(task));