public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lockstat - repair erronous contention statistics
@ 2008-08-25 21:16 Joe Korty
  2008-08-26  8:41 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Korty @ 2008-08-25 21:16 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

Fix bad contention counting in /proc/lock_stat.

/proc/lockstat tries to gather per-ip contention
statistics per-lock.  This was failing due to
a garbage per-ip index selector being used.

Index: 2.6.26/kernel/lockdep.c
===================================================================
--- 2.6.26.orig/kernel/lockdep.c	2008-07-13 17:51:29.000000000 -0400
+++ 2.6.26/kernel/lockdep.c	2008-08-25 17:00:15.000000000 -0400
@@ -2791,7 +2791,7 @@
 
 	stats = get_lock_stats(hlock->class);
 	if (point < ARRAY_SIZE(stats->contention_point))
-		stats->contention_point[i]++;
+		stats->contention_point[point]++;
 	if (lock->cpu != smp_processor_id())
 		stats->bounces[bounce_contended + !!hlock->read]++;
 	put_lock_stats(stats);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-26  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 21:16 [PATCH] lockstat - repair erronous contention statistics Joe Korty
2008-08-26  8:41 ` Ingo Molnar
2008-08-26  8:46   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox