PROBLEM: kernel 2.3.21 cannot boot with large memory.

kumon@flab.fujitsu.co.jp
Wed, 13 Oct 1999 21:30:47 +0900


Hi,

I faced the following booting problem, I hope someone give me some
advices.

Our XEON 4Way system cannot boot linux kernel version 2.3.19 and
2.3.21 with 1GB of main memory.
I don't have tested 2.3.20 yet.

When the memory size is reduced to 512MB with boot params, or, kernel is
made with BIGMEM option, kernel can boot successfully in both cases.

I've found some facts, but cannot trackdown to the fundamental
problem, so I'll show you the intermediate results.

-----
The boot error message itself is:
"Unable to load interpreter\n"
which is found in linux-2.3.21/fs/binfmt_elf.c.

Actually, the kernel fails to load a elf-format executable, after its
internal initialization.

I found the following facts:
* do_mmap() in mm/mmap.c fails with ENOMEM.
* vm_enough_memory() in linux-2.3.21/mm/mmap.c returns FALSE,
because variable 'free' is *negative* value.

The value 'free' is calculated with the following statements:
free = atomic_read(&buffermem) >> PAGE_SHIFT;
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;

With 1GB memory, the above statements are actually doing following
calculation:
free = 10 + 3 + 11344 + 0 - 13762 -> -2405

With 512MB memory, the value is not negative like:
free = 30 + 419 + 127380 + 0 - 7864 -> 119965

Comparing both, apparently in 1GB case, the third value
(nr_free_pages) is too small.

I guess, 'nr_free_pages' is initialized in mm/page_alloc.c but I don't
understand what makes the value small.

Does anybody give me a suggestion?

--
Computer Systems Laboratory, Fujitsu Labs.
kumon@flab.fujitsu.co.jp

- 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/