[PATCH 3/8] x86 - Specify amount of kernel memory at boot time

From: Mel Gorman
Date: Fri May 05 2006 - 13:36:04 EST



This patch adds the kernelcore= parameter for x86.

Signed-off-by: Mel Gorman <mel@xxxxxxxxx>
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.17-rc3-mm1-zonesizing-102_addzone/arch/i386/kernel/setup.c linux-2.6.17-rc3-mm1-zonesizing-103_x86coremem/arch/i386/kernel/setup.c
--- linux-2.6.17-rc3-mm1-zonesizing-102_addzone/arch/i386/kernel/setup.c 2006-05-03 09:42:16.000000000 +0100
+++ linux-2.6.17-rc3-mm1-zonesizing-103_x86coremem/arch/i386/kernel/setup.c 2006-05-03 09:47:22.000000000 +0100
@@ -943,6 +943,18 @@ static void __init parse_cmdline_early (
else if (!memcmp(from, "vmalloc=", 8))
__VMALLOC_RESERVE = memparse(from+8, &from);

+ /*
+ * kernelcore=size sets the amount of memory for use for
+ * kernel allocations that cannot be reclaimed easily.
+ * The remaining memory is set aside for easy reclaim
+ * for features like memory remove or huge page allocations
+ */
+ else if (!memcmp(from, "kernelcore=",11)) {
+ unsigned long core_pages;
+ core_pages = memparse(from+11, &from) >> PAGE_SHIFT;
+ set_required_kernelcore(core_pages);
+ }
+
next_char:
c = *(from++);
if (!c)
-
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/