Re: PROBLEM: kernel 2.3.21 cannot boot with large memory.

Andrea Arcangeli (andrea@suse.de)
Wed, 13 Oct 1999 23:20:08 +0200 (CEST)


On Wed, 13 Oct 1999 kumon@flab.fujitsu.co.jp wrote:

> free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100;

IMHO we could kill the above two lines (the min_percent on the buffer
cache is not preserved anymore in 2.3.x btw).

Please try out this patch against 2.3.21 (untested).

diff -urN 2.3.21/mm/mmap.c 2.3.21-mmap/mm/mmap.c
--- 2.3.21/mm/mmap.c Tue Sep 14 14:35:32 1999
+++ 2.3.21-mmap/mm/mmap.c Wed Oct 13 23:12:02 1999
@@ -66,7 +66,6 @@
free += atomic_read(&page_cache_size);
free += nr_free_pages;
free += nr_swap_pages;
- free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100;
return free > pages;
}

I think the above will have also the benefit of killing an bad user that is
getting fun with:

for (;;)
malloc(1);

The above malicious proggy is not going to be killed (and so it's allowed
to starve the system) thanks to such check.

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/