mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
29cb9f9c55
commit
ba89966c19
29 changed files with 39 additions and 39 deletions
|
|
@ -62,7 +62,7 @@
|
|||
/* Global data structures. */
|
||||
struct sctp_globals sctp_globals;
|
||||
struct proc_dir_entry *proc_net_sctp;
|
||||
DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics);
|
||||
DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics) __read_mostly;
|
||||
|
||||
struct idr sctp_assocs_id;
|
||||
DEFINE_SPINLOCK(sctp_assocs_id_lock);
|
||||
|
|
@ -78,8 +78,8 @@ static struct sctp_pf *sctp_pf_inet_specific;
|
|||
static struct sctp_af *sctp_af_v4_specific;
|
||||
static struct sctp_af *sctp_af_v6_specific;
|
||||
|
||||
kmem_cache_t *sctp_chunk_cachep;
|
||||
kmem_cache_t *sctp_bucket_cachep;
|
||||
kmem_cache_t *sctp_chunk_cachep __read_mostly;
|
||||
kmem_cache_t *sctp_bucket_cachep __read_mostly;
|
||||
|
||||
extern int sctp_snmp_proc_init(void);
|
||||
extern int sctp_snmp_proc_exit(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue