Commit 04148b73 authored by Joe Korty's avatar Joe Korty Committed by Ingo Molnar

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.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2189459d
...@@ -3029,7 +3029,7 @@ found_it: ...@@ -3029,7 +3029,7 @@ found_it:
stats = get_lock_stats(hlock_class(hlock)); stats = get_lock_stats(hlock_class(hlock));
if (point < ARRAY_SIZE(stats->contention_point)) if (point < ARRAY_SIZE(stats->contention_point))
stats->contention_point[i]++; stats->contention_point[point]++;
if (lock->cpu != smp_processor_id()) if (lock->cpu != smp_processor_id())
stats->bounces[bounce_contended + !!hlock->read]++; stats->bounces[bounce_contended + !!hlock->read]++;
put_lock_stats(stats); put_lock_stats(stats);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment