path: root/sound/drivers
diff options
authorFrederic Weisbecker <>2010-04-06 00:10:17 +0200
committerIngo Molnar <>2010-04-06 00:15:37 +0200
commitbd6d29c25bb1a24a4c160ec5de43e0004e01f72b (patch)
tree0aa96c7e9fdfbe7dc9c7e40151aed928903240f0 /sound/drivers
parentced918eb748ce30b3aace549fd17540e40ffdca0 (diff)
lockstat: Make lockstat counting per cpu
Locking statistics are implemented using global atomic variables. This is usually fine unless some path write them very often. This is the case for the function and function graph tracers that disable irqs for each entry saved (except if the function tracer is in preempt disabled only mode). And calls to local_irq_save/restore() increment hardirqs_on_events and hardirqs_off_events stats (or similar stats for redundant versions). Incrementing these global vars for each function ends up in too much cache bouncing if lockstats are enabled. To solve this, implement the debug_atomic_*() operations using per cpu vars. -v2: Use per_cpu() instead of get_cpu_var() to fetch the desired cpu vars on debug_atomic_read() -v3: Store the stats in a structure. No need for local_t as we are NMI/irq safe. -v4: Fix tons of build errors. I thought I had tested it but I probably forgot to select the relevant config. Suggested-by: Steven Rostedt <> Signed-off-by: Frederic Weisbecker <> Cc: Peter Zijlstra <> Cc: Steven Rostedt <> LKML-Reference: <> Signed-off-by: Ingo Molnar <> Cc: Peter Zijlstra <> Cc: Steven Rostedt <>
Diffstat (limited to 'sound/drivers')
0 files changed, 0 insertions, 0 deletions