mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
inet: cleanup of local_port_range
I noticed sysctl_local_port_range[] and its associated seqlock sysctl_local_port_range_lock were on separate cache lines. Moreover, sysctl_local_port_range[] was close to unrelated variables, highly modified, leading to cache misses. Moving these two variables in a structure can help data locality and moving this structure to read_mostly section helps sharing of this data among cpus. Cleanup of extern declarations (moved in include file where they belong), and use of inet_get_local_port_range() accessor instead of direct access to ports values. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9088c56095
commit
3c689b7320
3 changed files with 23 additions and 20 deletions
|
@ -178,6 +178,10 @@ extern unsigned long snmp_fold_field(void *mib[], int offt);
|
|||
extern int snmp_mib_init(void *ptr[2], size_t mibsize);
|
||||
extern void snmp_mib_free(void *ptr[2]);
|
||||
|
||||
extern struct local_ports {
|
||||
seqlock_t lock;
|
||||
int range[2];
|
||||
} sysctl_local_ports;
|
||||
extern void inet_get_local_port_range(int *low, int *high);
|
||||
|
||||
extern int sysctl_ip_default_ttl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue