Skip to content

Commit

Permalink
lockstat: repair erronous contention statistics
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Joe Korty authored and Ingo Molnar committed Aug 26, 2008
1 parent 2189459 commit 04148b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)

stats = get_lock_stats(hlock_class(hlock));
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);
Expand Down

0 comments on commit 04148b7

Please sign in to comment.