89 messages in org.kernel.vger.linux-kernelRe: 2G memory split
FromSent OnAttachments
Jens AxboeJan 10, 2006 4:58 am 
Ingo MolnarJan 10, 2006 5:29 am 
Jens AxboeJan 10, 2006 5:37 am 
Byron StanoszekJan 10, 2006 5:43 am 
Jens AxboeJan 10, 2006 5:47 am 
Mikael PetterssonJan 10, 2006 5:47 am 
Jens AxboeJan 10, 2006 5:53 am 
Gerd HoffmannJan 10, 2006 6:09 am 
Mark LordJan 10, 2006 6:11 am 
Jens AxboeJan 10, 2006 6:21 am 
Jens AxboeJan 10, 2006 6:22 am 
Jens AxboeJan 10, 2006 6:25 am 
Jens AxboeJan 10, 2006 6:39 am 
Ingo MolnarJan 10, 2006 6:43 am 
Jens AxboeJan 10, 2006 7:03 am 
Mark LordJan 10, 2006 7:11 am.patch
Mikael PetterssonJan 10, 2006 7:23 am 
Linus TorvaldsJan 10, 2006 8:14 am 
Jeff V. MerkeyJan 10, 2006 8:30 am.patch, .patch
Mark LordJan 10, 2006 8:39 am 
Linus TorvaldsJan 10, 2006 8:52 am 
Jeff V. MerkeyJan 10, 2006 8:56 am 
Jeff V. MerkeyJan 10, 2006 9:00 am 
Mark LordJan 10, 2006 9:06 am 
Sergey VlasovJan 10, 2006 9:07 am 
Jeff V. MerkeyJan 10, 2006 9:13 am 
Jeff V. MerkeyJan 10, 2006 9:17 am 
Linus TorvaldsJan 10, 2006 9:28 am 
Jens AxboeJan 10, 2006 9:32 am 
Jeff V. MerkeyJan 10, 2006 9:36 am 
Mark LordJan 10, 2006 9:36 am 
Bernd EckenfelsJan 10, 2006 9:48 am 
Martin BlighJan 10, 2006 10:14 am 
Coywolf Qi HuntJan 10, 2006 10:27 am 
Coywolf Qi HuntJan 10, 2006 10:32 am 
Linus TorvaldsJan 10, 2006 10:34 am 
Martin BlighJan 10, 2006 10:39 am 
Mark LordJan 10, 2006 10:45 am 
Martin BlighJan 10, 2006 10:46 am 
Lennart SorensenJan 10, 2006 10:50 am 
Dave HansenJan 10, 2006 10:54 am 
Mark LordJan 10, 2006 10:57 am 
Jens AxboeJan 10, 2006 10:57 am 
Mark LordJan 10, 2006 11:01 am 
Dave HansenJan 10, 2006 11:04 am 
Jeff V. MerkeyJan 10, 2006 11:12 am 
Mark LordJan 10, 2006 11:15 am 
Jens AxboeJan 10, 2006 11:26 am 
Jeff V. MerkeyJan 10, 2006 11:30 am 
Jens AxboeJan 10, 2006 11:41 am 
Bernd EckenfelsJan 10, 2006 12:17 pm 
Jens AxboeJan 10, 2006 12:27 pm 
Jan EngelhardtJan 10, 2006 12:42 pm 
Alan CoxJan 10, 2006 12:54 pm 
Jens AxboeJan 10, 2006 1:02 pm 
Con KolivasJan 10, 2006 4:25 pm 
J.A. MagallonJan 10, 2006 5:12 pm 
Bernd EckenfelsJan 11, 2006 12:39 am 
Jens AxboeJan 11, 2006 2:05 am 
Jens AxboeJan 11, 2006 2:15 am 
Greg NorrisJan 11, 2006 8:00 am 
Mark LordJan 11, 2006 9:12 am 
Greg NorrisJan 11, 2006 9:44 am 
Herbert PoetzlFeb 1, 2006 2:22 pm 
Ulrich MuellerFeb 2, 2006 3:03 am 
Jan EngelhardtFeb 2, 2006 12:55 pm 
Mark LordFeb 3, 2006 2:38 pm 
Ulrich MuellerFeb 4, 2006 2:22 am 
Jens AxboeFeb 4, 2006 2:35 am 
Jan EngelhardtFeb 4, 2006 3:04 am 
Jan EngelhardtFeb 4, 2006 3:05 am 
Mark LordFeb 4, 2006 5:57 am 
J.A. MagallonFeb 5, 2006 7:32 am 
Arjan van de VenFeb 5, 2006 7:38 am 
Barry K. NathanFeb 5, 2006 10:41 am 
Bodo EggertFeb 5, 2006 12:20 pm 
Jan EngelhardtFeb 5, 2006 1:13 pm 
Arjan van de VenFeb 5, 2006 1:18 pm 
Jeff DikeFeb 5, 2006 2:12 pm 
Jan EngelhardtFeb 6, 2006 6:56 am 
Herbert PoetzlFeb 6, 2006 4:41 pm 
Mark RustadFeb 6, 2006 6:50 pm 
Bernd PetrovitschFeb 7, 2006 1:37 am 
Adrian BunkFeb 7, 2006 4:19 am 
Ulrich MuellerFeb 7, 2006 6:05 am 
Adrian BunkFeb 7, 2006 6:42 am 
Jan EngelhardtFeb 9, 2006 8:06 am 
Kirill KorotaevApr 10, 2006 7:10 am 
Mark LordApr 10, 2006 7:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: 2G memory splitActions...
From:Coywolf Qi Hunt (coyw@gmail.com)
Date:Jan 10, 2006 10:27:39 am
List:org.kernel.vger.linux-kernel

2006/1/10, Jens Axboe <axb@suse.de>:

On Tue, Jan 10 2006, Byron Stanoszek wrote:

On Tue, 10 Jan 2006, Jens Axboe wrote:

yes, i made it totally configurable in 2.4 days: 1:3, 2/2 and 3:1 splits were possible. It was a larger patch to enable all this across x86, but the Kconfig portion was removed a bit later because people _frequently_ misconfigured their kernels and then complained about the results.

How is this different than all other sorts of misconfigurations? As far as I can tell, the biggest "problem" for some is if they depend on some binary module that will of course break with a different page offset.

For simplicity, I didn't add more than the 2/2 split, where we could add even a 3/1 kernel/user or a 0.5/3.5 (I think sles8 had this).

I prefer setting __PAGE_OFFSET to (0x78000000) on machines with 2GB of RAM. This seems to let the kernel use the full 2GB of memory, rather than just 1920-1984 MB (at least back in 2.4 days).

A newer version, trying to cater to the various comments in here. Changes:

- Add 1G_OPT split, meant for 1GiB machines. Uses 0xB0000000 - Add 1G/3G split - Move the 2G/2G a little, so the full 2GiB of ram can be mapped. - Improve help text (I hope :) - Make option depend on EXPERIMENTAL. - Make the page.h a lot more readable.

---

Add option for configuring the page offset, to better optimize the kernel for higher memory machines. Enables users to get rid of high memory for eg a 1GiB machine.

Signed-off-by: Jens Axboe <axb@suse.de>

diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index d849c68..fcad8f7 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -444,6 +464,32 @@ config HIGHMEM64G

endchoice

+choice + depends on NOHIGHMEM && EXPERIMENTAL + prompt "Memory split" + default DEFAULT_3G + help + Select the wanted split between kernel and user memory. + + If the address range available to the kernel is less than the + physical memory installed, the remaining memory will be available + as "high memory". Accessing high memory is a little more costly + than low memory, as it needs to be mapped into the kernel first. + + Note that selecting anything but the default 3G/1G split will make + your kernel incompatible with binary only modules. + + config DEFAULT_3G + bool "3G/1G user/kernel split" + config DEFAULT_3G_OPT + bool "3G/1G user/kernel split (for full 1G low memory)" + config DEFAULT_2G + bool "2G/2G user/kernel split" + config DEFAULT_1G + bool "1G/3G user/kernel split"

I don't like these names. Can't your invent better ones? Having multiple defaults seems odd. See these maybe:

MEMSPLIT_U3_K1 MEMSPLIT_U11_K5 MEMSPLIT_U39_K44 MEMSPLIT_U1_K3

odd too? midnight here. |-)

+ +endchoice + config HIGHMEM bool depends on HIGHMEM64G || HIGHMEM4G diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 73296d9..7da50a1 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h @@ -109,11 +109,23 @@ extern int page_is_ram(unsigned long pag

#endif /* __ASSEMBLY__ */

+#if defined(CONFIG_DEFAULT_3G) +#define __PAGE_OFFSET_RAW (0xC0000000) +#elif defined(CONFIG_DEFAULT_3G_OPT) +#define __PAGE_OFFSET_RAW (0xB0000000) +#elif defined(CONFIG_DEFAULT_2G) +#define __PAGE_OFFSET_RAW (0x78000000) +#elif defined(CONFIG_DEFAULT_1G) +#define __PAGE_OFFSET_RAW (0x40000000) +#else +#error "Bad user/kernel offset" +#endif + #ifdef __ASSEMBLY__ -#define __PAGE_OFFSET (0xC0000000) +#define __PAGE_OFFSET __PAGE_OFFSET_RAW #define __PHYSICAL_START CONFIG_PHYSICAL_START #else -#define __PAGE_OFFSET (0xC0000000UL) +#define __PAGE_OFFSET ((unsigned long)__PAGE_OFFSET_RAW) #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) #endif #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START)