diff options
author | Brian Haley <brian.haley@hp.com> | 2006-09-22 17:15:41 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:55:03 -0400 |
commit | ab32ea5d8a760e7dd4339634e95d7be24ee5b842 (patch) | |
tree | 8460a66c529fe03f926848326d9b6aa874e19514 /net/core | |
parent | 56fc85ac961e2c20dcb5ef07e2628b3f93de2e49 (diff) |
[NET/IPV4/IPV6]: Change some sysctl variables to __read_mostly
Change net/core, ipv4 and ipv6 sysctl variables to __read_mostly.
Couldn't actually measure any performance increase while testing (.3%
I consider noise), but seems like the right thing to do.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 2 | ||||
-rw-r--r-- | net/core/sock.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 23ae5e5426db..c7e653ff5ed0 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2451,7 +2451,7 @@ static struct neigh_sysctl_table { | |||
2451 | ctl_table neigh_neigh_dir[2]; | 2451 | ctl_table neigh_neigh_dir[2]; |
2452 | ctl_table neigh_proto_dir[2]; | 2452 | ctl_table neigh_proto_dir[2]; |
2453 | ctl_table neigh_root_dir[2]; | 2453 | ctl_table neigh_root_dir[2]; |
2454 | } neigh_sysctl_template = { | 2454 | } neigh_sysctl_template __read_mostly = { |
2455 | .neigh_vars = { | 2455 | .neigh_vars = { |
2456 | { | 2456 | { |
2457 | .ctl_name = NET_NEIGH_MCAST_SOLICIT, | 2457 | .ctl_name = NET_NEIGH_MCAST_SOLICIT, |
diff --git a/net/core/sock.c b/net/core/sock.c index b67d868649cd..cfaf09039b02 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -187,13 +187,13 @@ static struct lock_class_key af_callback_keys[AF_MAX]; | |||
187 | #define SK_RMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS) | 187 | #define SK_RMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS) |
188 | 188 | ||
189 | /* Run time adjustable parameters. */ | 189 | /* Run time adjustable parameters. */ |
190 | __u32 sysctl_wmem_max = SK_WMEM_MAX; | 190 | __u32 sysctl_wmem_max __read_mostly = SK_WMEM_MAX; |
191 | __u32 sysctl_rmem_max = SK_RMEM_MAX; | 191 | __u32 sysctl_rmem_max __read_mostly = SK_RMEM_MAX; |
192 | __u32 sysctl_wmem_default = SK_WMEM_MAX; | 192 | __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX; |
193 | __u32 sysctl_rmem_default = SK_RMEM_MAX; | 193 | __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX; |
194 | 194 | ||
195 | /* Maximal space eaten by iovec or ancilliary data plus some space */ | 195 | /* Maximal space eaten by iovec or ancilliary data plus some space */ |
196 | int sysctl_optmem_max = sizeof(unsigned long)*(2*UIO_MAXIOV + 512); | 196 | int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512); |
197 | 197 | ||
198 | static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) | 198 | static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) |
199 | { | 199 | { |