diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 | 
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 | 
| commit | 5e66dd6d66ffe758b39b6dcadf2330753ee1159b (patch) | |
| tree | a72cdcff4448e4af9425cc213ddf56ab23e697fe /net/ipv4/route.c | |
| parent | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (diff) | |
| parent | ca78f6baca863afe2e6a244a0fe94b3a70211d46 (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'net/ipv4/route.c')
| -rw-r--r-- | net/ipv4/route.c | 26 | 
1 files changed, 16 insertions, 10 deletions
| diff --git a/net/ipv4/route.c b/net/ipv4/route.c index da44fabf4dc5..2dc6dbb28467 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -205,21 +205,27 @@ __u8 ip_tos2prio[16] = {  struct rt_hash_bucket {  	struct rtable	*chain;  }; -#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) +#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) || \ +	defined(CONFIG_PROVE_LOCKING)  /*   * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks   * The size of this table is a power of two and depends on the number of CPUS. + * (on lockdep we have a quite big spinlock_t, so keep the size down there)   */ -#if NR_CPUS >= 32 -#define RT_HASH_LOCK_SZ	4096 -#elif NR_CPUS >= 16 -#define RT_HASH_LOCK_SZ	2048 -#elif NR_CPUS >= 8 -#define RT_HASH_LOCK_SZ	1024 -#elif NR_CPUS >= 4 -#define RT_HASH_LOCK_SZ	512 +#ifdef CONFIG_LOCKDEP +# define RT_HASH_LOCK_SZ	256  #else -#define RT_HASH_LOCK_SZ	256 +# if NR_CPUS >= 32 +#  define RT_HASH_LOCK_SZ	4096 +# elif NR_CPUS >= 16 +#  define RT_HASH_LOCK_SZ	2048 +# elif NR_CPUS >= 8 +#  define RT_HASH_LOCK_SZ	1024 +# elif NR_CPUS >= 4 +#  define RT_HASH_LOCK_SZ	512 +# else +#  define RT_HASH_LOCK_SZ	256 +# endif  #endif  static spinlock_t	*rt_hash_locks; | 
