diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:49:31 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:49:31 -0400 |
| commit | 31b7eab27a314b153d8fa07ba9e9ec00a98141e1 (patch) | |
| tree | 47415377d5f9bcf8c06e501f1636088548202edf /include/linux/lockdep.h | |
| parent | 1053e6bba091d9d18797f7789df6a7ef8735f20c (diff) | |
| parent | 4ba053c04aece1f4734056f21b751eee47ea3fb1 (diff) | |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: Check the depth of subclass
lockdep: Add improved subclass caching
affs: Use sema_init instead of init_MUTEX
hfs: Convert tree_lock to mutex
arm: Bcmring: semaphore cleanup
printk: Make console_sem a semaphore not a pseudo mutex
drivers/macintosh/adb: Do not claim that the semaphore is a mutex
parport: Semaphore cleanup
irda: Semaphore cleanup
net: Wan/cosa.c: Convert "mutex" to semaphore
net: Ppp_async: semaphore cleanup
hamradio: Mkiss: semaphore cleanup
hamradio: 6pack: semaphore cleanup
net: 3c527: semaphore cleanup
input: Serio/hp_sdc: semaphore cleanup
input: Serio/hil_mlc: semaphore cleanup
input: Misc/hp_sdc_rtc: semaphore cleanup
lockup_detector: Make callback function static
lockup detector: Fix grammar by adding a missing "to" in the comments
lockdep: Remove __debug_show_held_locks
Diffstat (limited to 'include/linux/lockdep.h')
| -rw-r--r-- | include/linux/lockdep.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 06aed8305bf..2186a64ee4b 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -32,6 +32,17 @@ extern int lock_stat; | |||
| 32 | #define MAX_LOCKDEP_SUBCLASSES 8UL | 32 | #define MAX_LOCKDEP_SUBCLASSES 8UL |
| 33 | 33 | ||
| 34 | /* | 34 | /* |
| 35 | * NR_LOCKDEP_CACHING_CLASSES ... Number of classes | ||
| 36 | * cached in the instance of lockdep_map | ||
| 37 | * | ||
| 38 | * Currently main class (subclass == 0) and signle depth subclass | ||
| 39 | * are cached in lockdep_map. This optimization is mainly targeting | ||
| 40 | * on rq->lock. double_rq_lock() acquires this highly competitive with | ||
| 41 | * single depth. | ||
| 42 | */ | ||
| 43 | #define NR_LOCKDEP_CACHING_CLASSES 2 | ||
| 44 | |||
| 45 | /* | ||
| 35 | * Lock-classes are keyed via unique addresses, by embedding the | 46 | * Lock-classes are keyed via unique addresses, by embedding the |
| 36 | * lockclass-key into the kernel (or module) .data section. (For | 47 | * lockclass-key into the kernel (or module) .data section. (For |
| 37 | * static locks we use the lock address itself as the key.) | 48 | * static locks we use the lock address itself as the key.) |
| @@ -138,7 +149,7 @@ void clear_lock_stats(struct lock_class *class); | |||
| 138 | */ | 149 | */ |
| 139 | struct lockdep_map { | 150 | struct lockdep_map { |
| 140 | struct lock_class_key *key; | 151 | struct lock_class_key *key; |
| 141 | struct lock_class *class_cache; | 152 | struct lock_class *class_cache[NR_LOCKDEP_CACHING_CLASSES]; |
| 142 | const char *name; | 153 | const char *name; |
| 143 | #ifdef CONFIG_LOCK_STAT | 154 | #ifdef CONFIG_LOCK_STAT |
| 144 | int cpu; | 155 | int cpu; |
