]> git.baikalelectronics.ru Git - kernel.git/commit
inet: cleanup of local_port_range
authorEric Dumazet <dada1@cosmosbay.com>
Wed, 8 Oct 2008 21:18:04 +0000 (14:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2008 21:18:04 +0000 (14:18 -0700)
commit73f00f5e848b8dc16cd15a32f719821c896991d7
treef9417dbd9f4aca952a1aba3e9a0f2a5a6e088dcd
parentb057d9b8ed4d1fb0f84987c79f38f7e12deac1a6
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>
include/net/ip.h
net/ipv4/inet_connection_sock.c
net/ipv4/sysctl_net_ipv4.c