Re: [PATCH] move the kernel to 16MB for NUMA-Q

From: Rene Herman
Date: Mon Jun 11 2007 - 16:11:49 EST

On 06/11/2007 08:46 PM, Dave Jones wrote:

On Mon, Jun 11, 2007 at 08:19:57PM +0200, Jan Engelhardt wrote:
> > On Jun 11 2007 10:36, H. Peter Anvin wrote:
> >
> >Picking the 16 MB base is a bit obnoxious on small-memory machines, 4 MB
> >would probably be a more reasonable base. Of course, 16 MB would avoid
> >the issue of the handful of machines with memory holes at 15-16 MB.
> > How will this work at all with a 5 MB machine?

Unless you're running with a bunch of CONFIG_EMBEDDED options enabled,
and a seriously pared down (almost to the point of uselessness)
userspace, you may have already lost.

Do such beasts even exist ? My memories of low-memory x86en I had
only allowed power of 2 memory sizes.

I have a 386 here that allows 5M, with 4x256K in bank 0 and 4x1M in bank 1 (it has 16M). 4M, let alone 16, wouldn't work on a 5M machine ofcourse.

But, it's just a default anyway. Would it be considered beneficial to more explicitly provide a few options through a config menu, something like the attached?

I don't know how to also (cleanly) provide a custom value in addition to the choices in Kconfig but maybe more options are not actually considered useful anyway?

And perhaps it's not considered useful period. Please just drop on the floor if so.


diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 8770a5d..6737529 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -813,9 +813,10 @@ config CRASH_DUMP
For more details see Documentation/kdump/kdump.txt

- hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
- default "0x100000"
+ depends on EMBEDDED || CRASH_DUMP
+ prompt "Physical address where the kernel is loaded"
This gives the physical address where the kernel is loaded.

@@ -854,6 +855,40 @@ config PHYSICAL_START

Don't change this unless you know what you are doing.

+ bool "1M"
+ help
+ Choose this to load the kernel at the standard 1M address.
+ bool "4M"
+ help
+ Loading the kernel at a 4M aligned physical address can
+ make for a slightly faster kernel.
+ Choose this if you have 8M or more installed.
+ bool "16M"
+ help
+ Loading the kernel at a 4M aligned physical address can
+ make for a slightly faster kernel.
+ Additionally, loading it at 16M gets it out of the legacy
+ DMA zone which you might consider beneficial if you use
+ devices doing legacy DMA (such as a floppy drive, an ECP
+ parallel port or DMA capable ISA peripherals).
+ Choose this if you have 20M or more installed and a need
+ for legacy DMA.
+ hex
+ default "0x100000" if PHYSICAL_START_1M
+ default "0x400000" if PHYSICAL_START_4M
+ default "0x1000000" if PHYSICAL_START_16M
bool "Build a relocatable kernel(EXPERIMENTAL)"