linux-stable/net/core
Eric Dumazet 21371f768b [SOCK] Avoid divides in sk_stream_pages() and __sk_stream_mem_reclaim()
sk_forward_alloc being signed, we should take care of divides by
SK_STREAM_MEM_QUANTUM we do in sk_stream_pages() and
__sk_stream_mem_reclaim()

This patchs introduces SK_STREAM_MEM_QUANTUM_SHIFT, defined
as ilog2(SK_STREAM_MEM_QUANTUM), to be able to use right
shifts instead of plain divides.

This should help compiler to choose right shifts instead of
expensive divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:00:05 -08:00
..
Makefile [NET]: Fix running without sysfs 2007-10-10 16:52:46 -07:00
datagram.c [UDP]: Only increment counter on first peek/recv 2008-01-28 14:56:34 -08:00
dev.c [NET]: Check RTNL status in unregister_netdevice 2008-01-28 14:57:43 -08:00
dev_mcast.c [NET]: Consolidate net namespace related proc files creation. 2008-01-28 14:54:28 -08:00
dst.c [NET]: dst_ifdown() cleanup 2008-01-28 14:57:05 -08:00
ethtool.c [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls 2007-10-10 16:51:17 -07:00
fib_rules.c [IPV6]: Make fib6_rules_init to return an error code. 2008-01-28 14:56:46 -08:00
filter.c [NET]: Fix bug in sk_filter race cures. 2007-10-18 21:48:39 -07:00
flow.c [NET]: Convert init_timer into setup_timer 2008-01-28 14:53:35 -08:00
gen_estimator.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
gen_stats.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
iovec.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
kmap_skb.h [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
link_watch.c [NET] link_watch: Always schedule urgent events 2007-05-10 23:45:28 -07:00
neighbour.c [NETNS]: Modify the neighbour table code so it handles multiple network namespaces 2008-01-28 15:00:03 -08:00
net-sysfs.c [NET]: Nicer WARN_ON in netstat_show 2008-01-28 14:55:10 -08:00
net-sysfs.h [NET]: Remove in-code externs for some functions from net/core/dev.c 2007-10-23 21:27:56 -07:00
net_namespace.c [NET]: Make netns cleanup to run in a separate queue 2008-01-28 14:54:35 -08:00
netevent.c [NET]: net/core/netevent.c should #include <net/netevent.h> 2007-07-05 17:40:27 -07:00
netpoll.c [IPV4] net/core: Use ipv4_is_<type> 2008-01-28 14:58:15 -08:00
pktgen.c [IPV4] net/core: Use ipv4_is_<type> 2008-01-28 14:58:15 -08:00
request_sock.c [NET] net/core/request_sock.c: Remove unused exports. 2008-01-28 14:54:33 -08:00
rtnetlink.c [NET]: Make the netlink methods in rtnetlink handle multiple network namespaces 2008-01-28 14:54:26 -08:00
scm.c [NET]: Fix function put_cmsg() which may cause usr application memory overflow 2007-12-20 14:36:44 -08:00
skbuff.c [TCP]: Splice receive support. 2008-01-28 14:53:31 -08:00
sock.c [NET]: Name magic constants in sock_wake_async() 2008-01-28 14:55:03 -08:00
stream.c [SOCK] Avoid divides in sk_stream_pages() and __sk_stream_mem_reclaim() 2008-01-28 15:00:05 -08:00
sysctl_net_core.c [NET] sysctl: make sysctl_somaxconn per-namespace 2008-01-28 14:56:57 -08:00
user_dma.c [NET]: Revert sk_buff walker cleanups. 2007-04-27 15:21:23 -07:00
utils.c [NET]: Move netfilter checksum helpers to net/core/utils.c 2008-01-28 14:55:14 -08:00