linux/net
Eric Dumazet ef711cf1d1 net: speedup dst_release()
During tbench/oprofile sessions, I found that dst_release() was in third position.

CPU: Core 2, speed 2999.68 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples  %        symbol name
483726    9.0185  __copy_user_zeroing_intel
191466    3.5697  __copy_user_intel
185475    3.4580  dst_release
175114    3.2648  ip_queue_xmit
153447    2.8608  tcp_sendmsg
108775    2.0280  tcp_recvmsg
102659    1.9140  sysenter_past_esp
101450    1.8914  tcp_current_mss
95067     1.7724  __copy_from_user_ll
86531     1.6133  tcp_transmit_skb

Of course, all CPUS fight on the dst_entry associated with 127.0.0.1 

Instead of first checking the refcount value, then decrement it,
we use atomic_dec_return() to help CPU to make the right memory transaction
(ie getting the cache line in exclusive mode)

dst_release() is now at the fifth position, and tbench a litle bit faster ;)

CPU: Core 2, speed 3000.1 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples  %        symbol name
647107    8.8072  __copy_user_zeroing_intel
258840    3.5229  ip_queue_xmit
258302    3.5155  __copy_user_intel
209629    2.8531  tcp_sendmsg
165632    2.2543  dst_release
149232    2.0311  tcp_current_mss
147821    2.0119  tcp_recvmsg
137893    1.8767  sysenter_past_esp
127473    1.7349  __copy_from_user_ll
121308    1.6510  ip_finish_output
118510    1.6129  tcp_transmit_skb
109295    1.4875  tcp_v4_rcv

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-14 00:53:54 -08:00
..
9p net/9p: fix printk format warnings 2008-11-05 13:19:07 -06:00
802 net: '&' redux 2008-11-03 18:21:05 -08:00
8021q Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
appletalk netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
atm netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
ax25 net: '&' redux 2008-11-03 18:21:05 -08:00
bluetooth netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
bridge netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
can net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
core net: speedup dst_release() 2008-11-14 00:53:54 -08:00
dccp dccp: Resolve dependencies of features on choice of CCID 2008-11-12 00:48:44 -08:00
decnet net: remove struct dst_entry::entry_size 2008-11-11 17:25:22 -08:00
dsa Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
econet
ethernet dsa: add support for Trailer tagging format 2008-10-08 17:24:16 -07:00
ieee80211 wireless: fix two bad print_ssid conversions 2008-11-10 15:17:33 -05:00
ipv4 net: ib_net pointer should depends on CONFIG_NET_NS 2008-11-12 00:54:20 -08:00
ipv6 net: remove struct dst_entry::entry_size 2008-11-11 17:25:22 -08:00
ipx net: '&' redux 2008-11-03 18:21:05 -08:00
irda netdevice: safe convert to netdev_priv() #part-4 2008-11-12 23:39:10 -08:00
iucv
key af_key: mark policy as dead before destroying 2008-11-06 23:08:37 -08:00
lapb
llc net: '&' redux 2008-11-03 18:21:05 -08:00
mac80211 mac80211: fix a buffer overrun in station debug code 2008-11-10 21:37:39 -08:00
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
netlabel net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
netlink netlink: constify struct nlattr * arg to parsing functions 2008-10-28 11:59:11 -07:00
netrom net: '&' redux 2008-11-03 18:21:05 -08:00
packet
phonet Phonet: use net_device built-in stats for GPRS 2008-11-10 16:21:05 -08:00
rfkill net: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-10 13:55:14 -08:00
rose net: '&' redux 2008-11-03 18:21:05 -08:00
rxrpc net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
sched pkt_sched: Remove qdisc->ops->requeue() etc. 2008-11-13 22:56:30 -08:00
sctp net: '&' redux 2008-11-03 18:21:05 -08:00
sunrpc sunrpc: Fix build warning due to typo in %pI4 format changes. 2008-11-02 23:57:06 -08:00
tipc tipc: trivial endian annotation in debug statement 2008-11-07 23:37:50 -08:00
unix Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-11 15:43:02 -08:00
wanrouter
wireless net: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-10 13:55:14 -08:00
x25 net: '&' redux 2008-11-03 18:21:05 -08:00
xfrm net: Remove unused parameter of xfrm_gen_index() 2008-11-12 23:28:15 -08:00
compat.c
Kconfig netns: Coexist with the sysfs limitations v2 2008-10-27 17:51:47 -07:00
Makefile net: Distributed Switch Architecture protocol support 2008-10-08 17:15:19 -07:00
nonet.c
socket.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-06 22:43:03 -08:00
sysctl_net.c
TUNABLE