diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-10 07:44:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:14 -0400 |
commit | d6d897cec29252b8d0785198cfa6ca16d30c739d (patch) | |
tree | 01b138b10c7afa0e88e9720be3d3616e4f0bccc1 /include/linux/lockdep.h | |
parent | 55794a412fdf9af1744800e5020a4ec6b21e3cdc (diff) |
[PATCH] lockdep: core, reduce per-lock class-cache size
lockdep_map is embedded into every lock, which blows up data structure
sizes all around the kernel. Reduce the class-cache to be for the default
class only - that is used in 99.9% of the cases and even if we dont have a
class cached, the lookup in the class-hash is lockless.
This change reduces the per-lock dep_map overhead by 56 bytes on 64-bit
platforms and by 28 bytes on 32-bit platforms.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r-- | include/linux/lockdep.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 316e0fb8d7b1..c040a8c969aa 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -120,7 +120,7 @@ struct lock_class { | |||
120 | */ | 120 | */ |
121 | struct lockdep_map { | 121 | struct lockdep_map { |
122 | struct lock_class_key *key; | 122 | struct lock_class_key *key; |
123 | struct lock_class *class[MAX_LOCKDEP_SUBCLASSES]; | 123 | struct lock_class *class_cache; |
124 | const char *name; | 124 | const char *name; |
125 | }; | 125 | }; |
126 | 126 | ||