Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/net
Pavel Emelyanov d0498d9ae1 [NET]: Do not allocate unneeded memory for dev->priv alignment.
The alloc_netdev_mq() tries to produce 32-bytes alignment for both
the net_device itself and its private data. The second alignment is
achieved by adding the NETDEV_ALIGN_CONST to the whole size of
the memory to be allocated.

However, for those devices that do not need the private area, this
addition just makes the net_device weight 1024 + 32 = 1068 bytes,
i.e. consume twice as much memory.

Since loopback device is such (sizeof_priv == 0 for it), and each
net namespace creates one, this can save a noticeable amount of
memory for kernel with net namespaces turned on.

After this set the lo device is actually allocated from a size-1024
kmem cache on i386 box even with NETPOLL and WIRELESS_EXT turned on.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-16 02:17:42 -07:00
..
9p
802
8021q [VLAN]: Handle vlan devices net namespace changing. 2008-04-16 00:57:01 -07:00
appletalk
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
ax25 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
bluetooth
bridge Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.26 2008-04-14 03:50:43 -07:00
can CAN: use hrtimers in can-bcm protocol 2008-04-15 19:29:14 -07:00
core [NET]: Do not allocate unneeded memory for dev->priv alignment. 2008-04-16 02:17:42 -07:00
dccp [DCCP]: Fix comment about control sockets. 2008-04-14 02:38:45 -07:00
decnet
econet
ethernet [NET]: Return more appropriate error from eth_validate_addr(). 2008-04-13 22:45:40 -07:00
ieee80211 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
ipv4 [NETNS]: Add netns refcnt debug for inet bind buckets. 2008-04-16 02:01:11 -07:00
ipv6 [NETNS]: Add netns refcnt debug for dst ops. 2008-04-16 02:01:34 -07:00
ipx
irda [IRDA]: Remove irlan_eth_send_gratuitous_arp() 2008-04-15 00:29:24 -07:00
iucv
key
lapb
llc
mac80211
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.26 2008-04-14 03:50:43 -07:00
netlabel
netlink
netrom
packet
rfkill
rose
rxrpc
sched Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
sctp Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
sunrpc
tipc [TIPC]: Enhance validation of format on incoming messages 2008-04-15 19:04:54 -07:00
unix
wanrouter
wireless Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
x25
xfrm [XFRM]: Compilation warnings in xfrm_user.c. 2008-04-14 14:47:48 -07:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE