1
linux/net/core
Benjamin LaHaise 4947d3ef8d [NET]: Speed up __alloc_skb()
From: Benjamin LaHaise <bcrl@kvack.org>

In __alloc_skb(), the use of skb_shinfo() which casts a u8 * to the 
shared info structure results in gcc being forced to do a reload of the 
pointer since it has no information on possible aliasing.  Fix this by 
using a pointer to refer to skb_shared_info.

By initializing skb_shared_info sequentially, the write combining buffers 
can reduce the number of memory transactions to a single write.  Reorder 
the initialization in __alloc_skb() to match the structure definition.  
There is also an alignment issue on 64 bit systems with skb_shared_info 
by converting nr_frags to a short everything packs up nicely.

Also, pass the slab cache pointer according to the fclone flag instead 
of using two almost identical function calls.

This raises bw_unix performance up to a peak of 707KB/s when combined 
with the spinlock patch.  It should help other networking protocols, too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-03 14:06:50 -08:00
..
datagram.c [IP]: Simplify and consolidate MSG_PEEK error handling 2006-01-03 13:10:41 -08:00
dev_mcast.c [NET]: kfree cleanup 2005-11-08 09:41:34 -08:00
dev.c [NET]: Fix NULL pointer deref in checksum debugging. 2005-12-08 15:21:39 -08:00
dst.c [PATCH] timer initialization cleanup: DEFINE_TIMER 2005-09-09 14:03:48 -07:00
dv.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ethtool.c [IPv4/IPv6]: UFO Scatter-gather approach 2005-10-28 16:30:00 -02:00
filter.c [NET]: Validate socket filters against BPF_MAXINSNS in one spot. 2005-12-27 13:57:59 -08:00
flow.c [LSM-IPSec]: Security association restriction. 2006-01-03 13:10:24 -08:00
gen_estimator.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gen_stats.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iovec.c [PATCH] misc verify_area cleanups 2005-05-01 08:59:08 -07:00
link_watch.c [NET]: Disable queueing when carrier is lost. 2005-05-03 16:18:52 -07:00
Makefile [NETFILTER]: split net/core/netfilter.c into net/netfilter/*.c 2005-08-29 15:51:11 -07:00
neighbour.c [NET]: Wider use of for_each_*cpu() 2005-10-25 23:54:01 -02:00
net-sysfs.c [NET]: Allow controlling NAPI device weight with sysfs 2005-06-08 14:55:42 -07:00
netpoll.c [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
pktgen.c [PKTGEN]: Deinitialise static variables. 2006-01-03 13:11:16 -08:00
request_sock.c [ICSK]: Introduce reqsk_queue_prune from code in tcp_synack_timer 2005-08-29 15:49:29 -07:00
rtnetlink.c [RTNETLINK]: Use generic netlink receive queue processor 2005-11-10 02:26:40 +01:00
scm.c [PATCH] kill gratitious includes of major.h under net/* 2005-04-25 18:32:13 -07:00
skbuff.c [NET]: Speed up __alloc_skb() 2006-01-03 14:06:50 -08:00
sock.c [TWSK]: Introduce struct timewait_sock_ops 2006-01-03 13:10:54 -08:00
stream.c [NET]: Avoid atomic xchg() for non-error case 2006-01-03 13:10:44 -08:00
sysctl_net_core.c [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
utils.c [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
wireless.c [PATCH] kill massive wireless-related log spam 2005-10-26 10:39:43 -07:00