diff options
author | Colin Cross <ccross@android.com> | 2011-07-12 20:11:00 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-07-12 20:11:00 -0700 |
commit | 2340c679cabc5477598ee3c9c2044ec8893d42fd (patch) | |
tree | 2cf2848bea005b9d807710f23dc5519191ca8215 /net/sctp/protocol.c | |
parent | 9a489d92af45a7d7c1bba9e0803f73f95d2fd13c (diff) | |
parent | 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff) | |
download | kernel_samsung_tuna-2340c679cabc5477598ee3c9c2044ec8893d42fd.zip kernel_samsung_tuna-2340c679cabc5477598ee3c9c2044ec8893d42fd.tar.gz kernel_samsung_tuna-2340c679cabc5477598ee3c9c2044ec8893d42fd.tar.bz2 |
Merge commit 'v3.0-rc7' into linux-omap-3.0
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 67380a2..207175b 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1058,7 +1058,6 @@ SCTP_STATIC __init int sctp_init(void) int status = -EINVAL; unsigned long goal; unsigned long limit; - unsigned long nr_pages; int max_share; int order; @@ -1148,15 +1147,7 @@ SCTP_STATIC __init int sctp_init(void) /* Initialize handle used for association ids. */ idr_init(&sctp_assocs_id); - /* Set the pressure threshold to be a fraction of global memory that - * is up to 1/2 at 256 MB, decreasing toward zero with the amount of - * memory, with a floor of 128 pages. - * Note this initializes the data in sctpv6_prot too - * Unabashedly stolen from tcp_init - */ - nr_pages = totalram_pages - totalhigh_pages; - limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT); - limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11); + limit = nr_free_buffer_pages() / 8; limit = max(limit, 128UL); sysctl_sctp_mem[0] = limit / 4 * 3; sysctl_sctp_mem[1] = limit; |