diff options
author | Kirill Korotaev <dev@sw.ru> | 2006-11-08 08:12:01 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-11-08 08:12:01 +0100 |
commit | a38c4343dc64fa5da5989d72c3dec9b5ed521f3b (patch) | |
tree | eb5664103485c058dd118e8b3a85fbc4e66ff2f3 /net | |
parent | 5db60db61aaa613f8c6dffa4213797c0dd83a8fd (diff) |
[IPV4]: Limit rt cache size properly.
During OpenVZ stress testing we found that UDP traffic with random src
can generate too much excessive rt hash growing leading finally to OOM
and kernel panics.
It was found that for 4GB i686 system (having 1048576 total pages and
225280 normal zone pages) kernel allocates the following route hash:
syslog: IP route cache hash table entries: 262144 (order: 8, 1048576
bytes) => ip_rt_max_size = 4194304 entries, i.e. max rt size is
4194304 * 256b = 1Gb of RAM > normal_zone
Attached the patch which removes HASH_HIGHMEM flag from
alloc_large_system_hash() call.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a67955e2637..c2cd901327b 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -3153,7 +3153,7 @@ int __init ip_rt_init(void) rhash_entries, (num_physpages >= 128 * 1024) ? 15 : 17, - HASH_HIGHMEM, + 0, &rt_hash_log, &rt_hash_mask, 0); |