android_kernel_samsung_msm8976/net/core
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
..
datagram.c
dev.c RPS: Ensure that an expired hardware filter can be re-added later 2011-10-03 12:14:45 -04:00
dev_addr_lists.c
drop_monitor.c
dst.c
ethtool.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
fib_rules.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
filter.c
flow.c net: Handle different key sizes between address families in flow cache 2011-09-16 17:47:28 -04:00
gen_estimator.c
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c net: linkwatch: allow vlans to get carrier changes faster 2011-09-15 15:36:34 -04:00
Makefile
neighbour.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
net-sysfs.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
net-sysfs.h
net-traces.c
net_namespace.c
netevent.c
netpoll.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
pktgen.c
request_sock.c
rtnetlink.c
scm.c af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
secure_seq.c
skbuff.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
sock.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c
utils.c