diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2005-08-26 15:05:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:11:18 -0400 |
commit | ba89966c1984513f4f2cc0a6c182266be44ddd03 (patch) | |
tree | 6e5766fc5c287708c03e0a162531dfd4785b0703 /net/sctp | |
parent | 29cb9f9c5502f6218cd3ea574efe46a5e55522d2 (diff) |
[NET]: use __read_mostly on kmem_cache_t , DEFINE_SNMP_STAT pointers
This patch puts mostly read only data in the right section
(read_mostly), to help sharing of these data between CPUS without
memory ping pongs.
On one of my production machine, tcp_statistics was sitting in a
heavily modified cache line, so *every* SNMP update had to force a
reload.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/protocol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 7d8ec6526347..e7025be77691 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -62,7 +62,7 @@ | |||
62 | /* Global data structures. */ | 62 | /* Global data structures. */ |
63 | struct sctp_globals sctp_globals; | 63 | struct sctp_globals sctp_globals; |
64 | struct proc_dir_entry *proc_net_sctp; | 64 | struct proc_dir_entry *proc_net_sctp; |
65 | DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics); | 65 | DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics) __read_mostly; |
66 | 66 | ||
67 | struct idr sctp_assocs_id; | 67 | struct idr sctp_assocs_id; |
68 | DEFINE_SPINLOCK(sctp_assocs_id_lock); | 68 | DEFINE_SPINLOCK(sctp_assocs_id_lock); |
@@ -78,8 +78,8 @@ static struct sctp_pf *sctp_pf_inet_specific; | |||
78 | static struct sctp_af *sctp_af_v4_specific; | 78 | static struct sctp_af *sctp_af_v4_specific; |
79 | static struct sctp_af *sctp_af_v6_specific; | 79 | static struct sctp_af *sctp_af_v6_specific; |
80 | 80 | ||
81 | kmem_cache_t *sctp_chunk_cachep; | 81 | kmem_cache_t *sctp_chunk_cachep __read_mostly; |
82 | kmem_cache_t *sctp_bucket_cachep; | 82 | kmem_cache_t *sctp_bucket_cachep __read_mostly; |
83 | 83 | ||
84 | extern int sctp_snmp_proc_init(void); | 84 | extern int sctp_snmp_proc_init(void); |
85 | extern int sctp_snmp_proc_exit(void); | 85 | extern int sctp_snmp_proc_exit(void); |