Skip to content

lock contention tracking -v3

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 26 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fix raw_spinlock_t vs lockdepinclude/linux/spinlock_types.h include/linux/spinlock_types_up.h+3 -100 replies
2/5lockdep: sanitise CONFIG_PROVE_LOCKINGkernel/lockdep.c kernel/spinlock.c+14 -33 replies
3/5lockstat: core infrastructureinclude/linux/lockdep.h include/linux/sysctl.h kernel/lockdep.c +2 more+404 -123 replies
4/5lockstat: human readability tweakskernel/lockdep_proc.c+266 -00 replies
5/5lockstat: hook into spinlock_t, rwlock_t, rwsem and mutexkernel/mutex.c kernel/rwsem.c kernel/spinlock.c+26 -180 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchIngo MolnarJason Baron
1/5A-b
2/5A-b A-b
3/5A-b A-b
4/5A-b A-b
5/5A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] lock contention tracking -v3

Use the lockdep infrastructure to track lock contention and other lock statistics.

It tracks lock contention events, and the first four unique call-sites that encountered contention.

It also measures lock wait-time and hold-time in nanoseconds. The minimum and maximum times are tracked, as well as a total (which together with the number of event can give the avg).

All statistics are done per lock class, per write (exclusive state) and per read (shared state).

The statistics are collected per-cpu, so that the collection overhead is minimized via having no global cachemisses.

This new lock statistics feature is independent of the lock dependency checking traditionally done by lockdep; it just shares the lock tracking code. It is also possible to enable both and runtime disabled either component - thereby avoiding the O(n^2) lock chain walks for instance.

Andrew, can we give this a spin in -mm?