diff options
| author | Jesse Barnes <jbarnes@engr.sgi.com> | 2004-11-10 21:29:32 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-10 21:29:32 -0800 |
| commit | a370025d1ed83b2b8202c4fefe4ea465bf22f10a (patch) | |
| tree | c18274d669421dc47eaedfbeab4a113f92172426 /include/linux/writeback.h | |
| parent | 6998fe2529d33f5441dbfed6e924c990d052c167 (diff) | |
[PATCH] remove contention on profile_lock
profile_hook unconditionally takes a read lock on profile_lock if kernel
profiling is enabled. The lock protects the profile_hook notifier chain
from being written while it's being called. The routine profile_hook is
called in a very hot path though: every timer tick on every CPU. As you
can imagine, on a large system, this makes the cacheline containing
profile_lock pretty hot. Since oprofile was the only user of the
profile_hook, I removed the notifier chain altogether in favor of a simple
function pointer with the help of John Levon. This removes all of the
contention in the hot path since the variable is very seldom written and
simplifies things a little to boot.
Acked-by: John Levon <levon@movementarian.org>
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/writeback.h')
0 files changed, 0 insertions, 0 deletions
