linux/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 netfilter: nf_queue: reject NF_STOLEN verdicts from userspace 2011-08-30 15:01:20 +02:00
Kconfig ipv6: ip6mr: support multiple tables 2010-05-11 14:40:55 +02:00
Makefile [IPV6] MROUTE: Support multicast forwarding. 2008-04-05 22:33:38 +09:00
addrconf.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
addrconf_core.c ipv6: Remove IPV6_ADDR_RESERVED 2010-02-26 03:59:07 -08:00
addrlabel.c rtnetlink: Compute and store minimum ifinfo dump size 2011-06-09 20:38:07 -07:00
af_inet6.c net: bind() fix error return on wrong address family 2011-07-04 21:37:41 -07:00
ah6.c xfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb 2011-03-13 20:22:28 -07:00
anycast.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
datagram.c net: relax PKTINFO non local ipv6 udp xmit check 2011-08-30 17:39:01 -04:00
esp6.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-05-05 14:59:02 -07:00
exthdrs.c ipv6: avoid a dst_entry refcount change in ipv6_destopt_rcv() 2011-08-01 00:12:00 -07:00
exthdrs_core.c net: return operator cleanup 2010-09-23 14:33:39 -07:00
fib6_rules.c ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00
icmp.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
inet6_connection_sock.c ipv6: use RCU in inet6_csk_xmit() 2011-08-01 00:12:00 -07:00
inet6_hashtables.c net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
ip6_fib.c net: fix NULL dereferences in check_peer_redir() 2011-08-03 03:34:12 -07:00
ip6_flowlabel.c net: relax PKTINFO non local ipv6 udp xmit check 2011-08-30 17:39:01 -04:00
ip6_input.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
ip6_output.c net: ipv6: convert to SKB frag APIs 2011-08-24 17:52:12 -07:00
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 inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
ipv6_sockglue.c net: relax PKTINFO non local ipv6 udp xmit check 2011-08-30 17:39:01 -04:00
mcast.c mcast: Fix source address selection for multicast listener report 2011-08-24 17:46:15 -07:00
mip6.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
ndisc.c ipv6: some RCU conversions 2011-08-01 00:12:00 -07:00
netfilter.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
proc.c ipv6: reduce per device ICMP mib sizes 2011-05-19 16:21:22 -04:00
protocol.c net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
raw.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
reassembly.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
route.c ipv6: check return value for dst_alloc 2011-09-27 15:32:06 -04:00
sit.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-08-20 10:39:12 -07:00
syncookies.c tcp: initialize variable ecn_ok in syncookies path 2011-08-10 21:59:57 -07:00
sysctl_net_ipv6.c net ipv6: Fix duplicate /proc/sys/net/ipv6/neigh directory entries. 2011-03-21 18:23:34 -07:00
tcp_ipv6.c Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
tunnel6.c tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
udp.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
udp_impl.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
udplite.c net: fix nulls list corruptions in sk_prot_alloc 2010-12-16 14:26:56 -08:00
xfrm6_input.c netfilter: ipv6: use NFPROTO values for NF_HOOK invocation 2010-03-25 16:00:49 +01:00
xfrm6_mode_beet.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
xfrm6_mode_ro.c [IPSEC]: Make x->lastused an unsigned long 2008-01-28 14:53:52 -08:00
xfrm6_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm6_mode_tunnel.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
xfrm6_output.c xfrm: Assign the inner mode output function to the dst entry 2011-05-10 15:03:34 -07:00
xfrm6_policy.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
xfrm6_state.c xfrm: Assign the inner mode output function to the dst entry 2011-05-10 15:03:34 -07:00
xfrm6_tunnel.c ipv6: Fix return of xfrm6_tunnel_rcv() 2011-05-24 01:11:51 -04:00