linux-stable-rt/net/ipv6
Eric Dumazet 87fb4b7b53 net: more accurate skb truesize
skb truesize currently accounts for sk_buff struct and part of skb head.
kmalloc() roundings are also ignored.

Considering that skb_shared_info is larger than sk_buff, its time to
take it into account for better memory accounting.

This patch introduces SKB_TRUESIZE(X) macro to centralize various
assumptions into a single place.

At skb alloc phase, we put skb_shared_info struct at the exact end of
skb head, to allow a better use of memory (lowering number of
reallocations), since kmalloc() gives us power-of-two memory blocks.

Unless SLUB/SLUB debug is active, both skb->head and skb_shared_info are
aligned to cache lines, as before.

Note: This patch might trigger performance regressions because of
misconfigured protocol stacks, hitting per socket or global memory
limits that were previously not reached. But its a necessary step for a
more accurate memory accounting.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <ak@linux.intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-13 16:05:07 -04:00
..
netfilter
Kconfig
Makefile
addrconf.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
addrconf_core.c
addrlabel.c
af_inet6.c
ah6.c
anycast.c
datagram.c
esp6.c
exthdrs.c
exthdrs_core.c
fib6_rules.c
icmp.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
inet6_connection_sock.c
inet6_hashtables.c
ip6_fib.c
ip6_flowlabel.c
ip6_input.c
ip6_output.c
ip6_tunnel.c ip6_tunnel: add optional fwmark inherit 2011-09-20 14:50:00 -04:00
ip6mr.c ipv6-multicast: Fix memory leak in IPv6 multicast. 2011-09-27 15:34:00 -04:00
ipcomp6.c
ipv6_sockglue.c
mcast.c
mip6.c
ndisc.c
netfilter.c
proc.c
protocol.c
raw.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
reassembly.c
route.c ipv6: check return value for dst_alloc 2011-09-27 15:32:06 -04:00
sit.c
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
tunnel6.c
udp.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
udp_impl.h
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_state.c
xfrm6_tunnel.c