diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-10-14 05:56:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-17 13:49:14 -0700 |
commit | 8e602ce2980fd6941dc0d3dda12e5095e8206f34 (patch) | |
tree | 1a0ea79a6db1b01660cc034c822d02c95e356388 /ipc/compat.c | |
parent | c60ce4e265404ca42ba860401f4b0f1e97332a67 (diff) | |
download | op-kernel-dev-8e602ce2980fd6941dc0d3dda12e5095e8206f34.zip op-kernel-dev-8e602ce2980fd6941dc0d3dda12e5095e8206f34.tar.gz |
netns: reorder fields in struct net
In a network bench, I noticed an unfortunate false sharing between
'loopback_dev' and 'count' fields in "struct net".
'count' is written each time a socket is created or destroyed, while
loopback_dev might be often read in routing code.
Move loopback_dev in a read mostly section of "struct net"
Note: struct netns_xfrm is cache line aligned on SMP.
(It contains a "struct dst_ops")
Move it at the end to avoid holes, and reduce sizeof(struct net) by 128
bytes on ia32.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'ipc/compat.c')
0 files changed, 0 insertions, 0 deletions