net: reorder fields of struct socket
authorEric Dumazet <dada1@cosmosbay.com>
Mon, 16 Mar 2009 02:59:13 +0000 (19:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2009 02:59:13 +0000 (19:59 -0700)
commit8bdd663aba341c15cd2fa9dbd7061b8b387964dc
tree9b80e3490f43477dbf42602cfc6b6d198bffc669
parentff4fbd43fe82de28710761f2cc2ed122d716483a
net: reorder fields of struct socket

On x86_64, its rather unfortunate that "wait_queue_head_t wait"
field of "struct socket" spans two cache lines (assuming a 64
bytes cache line in current cpus)

offsetof(struct socket, wait)=0x30
sizeof(wait_queue_head_t)=0x18

This might explain why Kenny Chang noticed that his multicast workload
was performing bad with 64 bit kernels, since more cache lines ping pongs
were involved.

This litle patch moves "wait" field next "fasync_list" so that both
fields share a single cache line, to speedup sock_def_readable()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/net.h