lockstat: measure lock bouncing
Peter Zijlstra authored

    __acquire
        |
       lock _____
        |        \
        |    __contended
        |         |
        |        wait
        | _______/
        |/
        |
   __acquired
        |
   __release
        |
     unlock

We measure acquisition and contention bouncing.

This is done by recording a cpu stamp in each lock instance.

Contention bouncing requires the cpu stamp to be set on acquisition. Hence we
move __acquired into the generic path.

__acquired is then used to measure acquisition bouncing by comparing the
current cpu with the old stamp before replacing it.

__contended is used to measure contention bouncing (only useful for preemptable
locks)

[akpm@linux-foundation.org: cleanups]
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
96645678
Name Last commit Last update
..
irq Improve behaviour of spurious IRQ detect
power PM: Integrate beeping flag with existing acpi_sleep flags
time kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
.gitignore gitignore: ignore more generated files
Kconfig.hz [PATCH] HZ: 300Hz support
Kconfig.preempt Fix trivial typos in Kconfig* files
Makefile user namespace: add the framework
acct.c [PATCH] kernel: change uses of f_{dentry, vfsmnt} to use f_path
audit.c Freezer: make kernel threads nonfreezable by default
audit.h Audit: add TTY input auditing
auditfilter.c kernel/auditfilter: kill bogus uninit'd-var compiler warning
auditsc.c mm: variable length argument support
capability.c [PATCH] pid: replace do/while_each_task_pid with do/while_each_pid_task
compat.c signal/timer/event: timerfd compat code
configs.c use simple_read_from_buffer in kernel/
cpu.c HOTPLUG: Add CPU_DYING notifier
cpuset.c usermodehelper: Tidy up waiting
delayacct.c sched: update delay-accounting to use CFS's precise stats
die_notifier.c move die notifier handling to common code
dma.c [PATCH] struct seq_operations and struct file_operations constification
exec_domain.c Remove obsolete #include <linux/config.h>
exit.c Freezer: avoid freezing kernel threads prematurely
extable.c [PATCH] symbol_put_addr() locks kernel
fork.c coredump masking: add an interface for core dump filter
futex.c mm: fault feedback #2
futex_compat.c
hrtimer.c
itimer.c
kallsyms.c
kexec.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latency.c
lockdep.c
lockdep_internals.h
lockdep_proc.c
module.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
nsproxy.c
panic.c
params.c
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
rcupdate.c
rcutorture.c
relay.c
resource.c
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
sched.c
sched_debug.c
sched_fair.c
sched_idletask.c
sched_rt.c
sched_stats.h
seccomp.c
signal.c
softirq.c
softlockup.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys.c
sys_ni.c
sysctl.c
taskstats.c
time.c
timer.c
tsacct.c
uid16.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
wait.c
workqueue.c