Re: [PATCH] Early memory patch, +accounting

From: H. Peter Anvin
Date: Thu Feb 26 2004 - 13:04:58 EST


Eric W. Biederman wrote:

I intend to export _end into setup.S so a bootloader can
tell what memory the kernel will attempt to use before looking at
the e820 map, the kernel command line, and the initrd location.
After that the kernel can properly dynamically allocate things.


You're confusing "may" with "will". This is the fundamental problem with this approach.

Exporting _end will allow two things.
1) On systems with a 15M-16M I/O hole the bootloader can check to see
if a big kernel will attempt to use memory in that region.

2) On small memory systems it will let the bootloader make a good
estimate to see if everything will fit into memory.

No, it won't, because it still has no idea whatsoever how much dynamically allocated memory it needs during boot.

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