linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2G memory split
@ 2006-01-10 12:58 Jens Axboe
  2006-01-10 13:29 ` Ingo Molnar
  0 siblings, 1 reply; 28+ messages in thread
From: Jens Axboe @ 2006-01-10 12:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Linus Torvalds

Hi,

It does annoy me that any 1G i386 machine will end up with 1/8th of the
memory as highmem. A patch like this one has been used in various places
since the early 2.4 days at least, is there a reason why it isn't merged
yet? Note I just hacked this one up, but similar patches abound I'm
sure. Bugs are mine.

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

diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index d849c68..0b2457b 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -444,6 +464,24 @@ config HIGHMEM64G
 
 endchoice
 
+choice
+	depends on NOHIGHMEM
+	prompt "Memory split"
+	default DEFAULT_3G
+	help
+	  Select the wanted split between kernel and user memory. On a 1G
+	  machine, the 3G/1G default split will result in 128MiB of high
+	  memory. Selecting a 2G/2G split will make all of memory available
+	  as low memory. Note that this will make your kernel incompatible
+	  with binary only kernel modules.
+
+	config DEFAULT_3G
+		bool "3G/1G user/kernel split"
+	config DEFAULT_2G
+		bool "2G/2G user/kernel split"
+
+endchoice
+
 config HIGHMEM
 	bool
 	depends on HIGHMEM64G || HIGHMEM4G
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index 73296d9..be5f6b6 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -110,10 +110,22 @@ extern int page_is_ram(unsigned long pag
 #endif /* __ASSEMBLY__ */
 
 #ifdef __ASSEMBLY__
+#if defined(CONFIG_DEFAULT_3G)
 #define __PAGE_OFFSET		(0xC0000000)
+#elif defined(CONFIG_DEFAULT_2G)
+#define __PAGE_OFFSET		(0x80000000)
+#else
+#error" Bad memory split"
+#endif
 #define __PHYSICAL_START	CONFIG_PHYSICAL_START
 #else
+#if defined(CONFIG_DEFAULT_3G)
 #define __PAGE_OFFSET		(0xC0000000UL)
+#elif defined(CONFIG_DEFAULT_2G)
+#define __PAGE_OFFSET		(0x80000000UL)
+#else
+#error "Bad memory split"
+#endif
 #define __PHYSICAL_START	((unsigned long)CONFIG_PHYSICAL_START)
 #endif
 #define __KERNEL_START		(__PAGE_OFFSET + __PHYSICAL_START)

-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2006-02-07  9:45 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5trTo-7aS-25@gated-at.bofh.it>
     [not found] ` <5trTo-7aS-23@gated-at.bofh.it>
     [not found]   ` <5ts37-7nG-23@gated-at.bofh.it>
     [not found]     ` <5tsZ0-lL-3@gated-at.bofh.it>
     [not found]       ` <5tuor-2zh-63@gated-at.bofh.it>
     [not found]         ` <5tvaL-3MA-77@gated-at.bofh.it>
     [not found]           ` <5tvDG-4nl-47@gated-at.bofh.it>
     [not found]             ` <5tvDF-4nl-45@gated-at.bofh.it>
     [not found]               ` <5twTa-6cF-25@gated-at.bofh.it>
     [not found]                 ` <5txcv-6OX-31@gated-at.bofh.it>
     [not found]                   ` <5ByEo-3fj-7@gated-at.bofh.it>
     [not found]                     ` <5BKvR-3gt-25@gated-at.bofh.it>
     [not found]                       ` <5BTJ2-fP-3@gated-at.bofh.it>
     [not found]                         ` <5ChUM-2f8-21@gated-at.bofh.it>
     [not found]                           ` <5CtsV-1zF-3@gated-at.bofh.it>
2006-02-05 20:20                             ` [PATCH ] VMSPLIT config options (with default config fixed) Bodo Eggert
2006-02-05 22:13                               ` Jeff Dike
2006-01-10 12:58 2G memory split Jens Axboe
2006-01-10 13:29 ` Ingo Molnar
2006-01-10 13:37   ` Jens Axboe
2006-01-10 13:43     ` Byron Stanoszek
2006-01-10 14:39       ` Jens Axboe
2006-01-10 16:14         ` Linus Torvalds
2006-01-10 17:07           ` Mark Lord
2006-01-10 17:32             ` Jens Axboe
2006-01-10 17:37               ` Mark Lord
2006-01-10 18:58                 ` Mark Lord
2006-01-10 19:16                   ` [PATCH ] VMSPLIT config options (with default config fixed) Mark Lord
2006-01-10 17:37                     ` Jeff V. Merkey
2006-01-10 19:27                     ` Jens Axboe
2006-01-11  1:13                     ` J.A. Magallon
2006-01-11 10:15                       ` Jens Axboe
2006-01-11 16:00                     ` Greg Norris
2006-01-11 17:13                       ` Mark Lord
2006-01-11 17:44                         ` Greg Norris
2006-02-05 18:42                         ` Barry K. Nathan
2006-02-01 22:23                     ` Herbert Poetzl
2006-02-02 11:04                       ` Ulrich Mueller
2006-02-02 20:55                         ` Jan Engelhardt
2006-02-03 22:39                           ` Mark Lord
2006-02-04 10:23                             ` Ulrich Mueller
2006-02-04 11:06                               ` Jan Engelhardt
2006-02-04 10:36                             ` Jens Axboe
2006-02-04 11:05                             ` Jan Engelhardt
2006-02-04 13:57                               ` Mark Lord
2006-02-05 15:32                                 ` J.A. Magallon
2006-02-05 15:38                               ` Arjan van de Ven
2006-02-05 21:14                                 ` Jan Engelhardt
2006-02-05 21:19                                   ` Arjan van de Ven
2006-02-06 14:56                                     ` Jan Engelhardt
2006-02-07  0:41                                       ` Herbert Poetzl
2006-02-07  2:51                                         ` Mark Rustad
2006-02-07  9:38                                         ` Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).