Skip to contentSkip to conversation

lockstat - repair erronous contention statistics

PATCH Applied Joe Korty 3 participants 3 messages Aug 25, 2008 – Aug 26, 2008

lore
Share & tools
lore

Joe Korty

author
#0 lore raw

PATCH 1/1 lockstat - repair erronous contention statistics

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.

kernel/lockdep.c +1 -1
Index: 2.6.26/kernel/lockdep.c
===================================================================
@@ -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);
Applied
#1 lore raw
Quoted 5 lines · Joe Korty

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.

applied to tip/core/urgent, thanks Joe.

Ingo

#2 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 5 lines · Joe Korty

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.

applied to tip/core/urgent, thanks Joe.

Ack, weird I remember having fixed this before, -rt even has this fix included.. /me kicks himself