diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-07 16:16:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-07 16:16:21 -0400 |
commit | 85746e429f8e5dc8c5c0beadc0f099cb1feab93e (patch) | |
tree | 65a6852655b441d03899d1cb7d8012ff52a915a1 /net/ipv4/udp.c | |
parent | 4dd1b49c6d215dc41ce50c80b4868388b93f31a3 (diff) | |
parent | 949123016a2ef578009b6aa3e98d45d1a154ebfb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
net: refine {udp|tcp|sctp}_mem limits
vmxnet3: round down # of queues to power of two
net: sh_eth: fix the parameter for the ETHER of SH7757
net: sh_eth: fix cannot work half-duplex mode
net: vlan: enable soft features regardless of underlying device
vmxnet3: fix starving rx ring whenoc_skb kb fails
bridge: Always flood broadcast packets
greth: greth_set_mac_add would corrupt the MAC address.
net: bind() fix error return on wrong address family
natsemi: silence dma-debug warnings
net: 8139too: Initial necessary vlan_features to support vlan
Fix call trace when interrupts are disabled while sleeping function kzalloc is called
qlge:Version change to v1.00.00.29
qlge: Fix printk priority so chip fatal errors are always reported.
qlge:Fix crash caused by mailbox execution on wedged chip.
xfrm4: Don't call icmp_send on local error
ipv4: Don't use ufo handling on later transformed packets
xfrm: Remove family arg from xfrm_bundle_ok
ipv6: Don't put artificial limit on routing table size.
...
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 48cd88e62553..198f75b7bdd3 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -2209,16 +2209,10 @@ void __init udp_table_init(struct udp_table *table, const char *name) | |||
2209 | 2209 | ||
2210 | void __init udp_init(void) | 2210 | void __init udp_init(void) |
2211 | { | 2211 | { |
2212 | unsigned long nr_pages, limit; | 2212 | unsigned long limit; |
2213 | 2213 | ||
2214 | udp_table_init(&udp_table, "UDP"); | 2214 | udp_table_init(&udp_table, "UDP"); |
2215 | /* Set the pressure threshold up by the same strategy of TCP. It is a | 2215 | limit = nr_free_buffer_pages() / 8; |
2216 | * fraction of global memory that is up to 1/2 at 256 MB, decreasing | ||
2217 | * toward zero with the amount of memory, with a floor of 128 pages. | ||
2218 | */ | ||
2219 | nr_pages = totalram_pages - totalhigh_pages; | ||
2220 | limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT); | ||
2221 | limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11); | ||
2222 | limit = max(limit, 128UL); | 2216 | limit = max(limit, 128UL); |
2223 | sysctl_udp_mem[0] = limit / 4 * 3; | 2217 | sysctl_udp_mem[0] = limit / 4 * 3; |
2224 | sysctl_udp_mem[1] = limit; | 2218 | sysctl_udp_mem[1] = limit; |