lkml.org 
[lkml]   [1998]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux and lots of memory: documentation?
Hi Alan.

>> I've been able to find very little information regarding this
>> topic, other than the comments in include/asm-i386/page.h. I was
>> hoping you could point me towards a resource that might answer the
>> following questions:

>> 1. How is __PAGE_OFFSET actually used? The page.h comments aren't
>> clear on this. They suggest *how* to change the value, but not
>> *why*.

> There is a big problem with the x86 architecture. Unless you start
> messing around switching page tables all the time (which isnt
> cheap) you can't easily access more than 4Gig combined
> physical+virtual address space.

> __PAGE_OFFSET is the dividing line. By default its 3Gig virt 1Gig
> phys. If you set it to 2/2 or 1/3 you get more physical ram but
> less virtual space per process.

Perhaps the enclosed patch (against 2.1.131ac13) would come in useful
here. It basically adds a configuration option in "Processor type and
features" to select the breakpoint between physical RAM and virtual
memory, and the method used allows quarter-gigabyte steps to be
selected. I've listed all valid steps from 0.75 to 3.00 Gigs of RAM,
but that can obviously be changed to suit...

Test results and comments much appreciated...

Best wishes from Riley.
--- linux/arch/i386/config.in.orig Thu Dec 17 20:45:03 1998
+++ linux/arch/i386/config.in Thu Dec 17 21:44:17 1998
@@ -11,11 +11,49 @@

mainmenu_option next_comment
comment 'Processor type and features'
-choice 'Processor family' \
+choice '80x86 Processor family' \
"386 CONFIG_M386 \
486/Cx486 CONFIG_M486 \
Pentium/K5/5x86/6x86 CONFIG_M586 \
PPro/K6/6x86MX CONFIG_M686" Pentium
+
+mainmenu_option next_comment
+comment 'Select physical/virtual memory split'
+comment 'IMPORTANT: Read help text first!!!'
+choice 'Physical memory limit (Gigabytes)' \
+ "0.75 CONFIG_MAXRAM_0G75 \
+ 1.00 CONFIG_MAXRAM_1G00 \
+ 1.25 CONFIG_MAXRAM_1G25 \
+ 1.50 CONFIG_MAXRAM_1G50 \
+ 1.75 CONFIG_MAXRAM_1G75 \
+ 2.00 CONFIG_MAXRAM_2G00 \
+ 2.25 CONFIG_MAXRAM_2G25 \
+ 2.50 CONFIG_MAXRAM_2G50 \
+ 2.75 CONFIG_MAXRAM_2G75 \
+ 3.00 CONFIG_MAXRAM_3G00" 1.00
+if [ -n "$CONFIG_MAXRAM_3G00" ]; then
+ CONFIG_MAXRAM=4
+elif [ -n "$CONFIG_MAXRAM_2G75" ]; then
+ CONFIG_MAXRAM=5
+elif [ -n "$CONFIG_MAXRAM_2G50" ]; then
+ CONFIG_MAXRAM=6
+elif [ -n "$CONFIG_MAXRAM_2G25" ]; then
+ CONFIG_MAXRAM=7
+elif [ -n "$CONFIG_MAXRAM_2G00" ]; then
+ CONFIG_MAXRAM=8
+elif [ -n "$CONFIG_MAXRAM_1G75" ]; then
+ CONFIG_MAXRAM=9
+elif [ -n "$CONFIG_MAXRAM_1G50" ]; then
+ CONFIG_MAXRAM=10
+elif [ -n "$CONFIG_MAXRAM_1G25" ]; then
+ CONFIG_MAXRAM=11
+elif [ -n "$CONFIG_MAXRAM_1G00" ]; then
+ CONFIG_MAXRAM=12
+else
+ CONFIG_MAXRAM=13
+fi
+endmenu
+
bool 'Math emulation' CONFIG_MATH_EMULATION
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR
--- linux/Documentation/Configure.help.orig Thu Dec 17 20:45:00 1998
+++ linux/Documentation/Configure.help Thu Dec 17 21:28:29 1998
@@ -1542,7 +1542,7 @@
The module will be called solaris.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.

-Processor family
+80x86 Processor family
CONFIG_M386
This is the processor type of your CPU. This information is used for
optimizing purposes. In order to compile a kernel that can run on
@@ -1566,6 +1566,23 @@
running on a 486: the kernel will be smaller but slower.

If you don't know what to do, choose "386".
+
+Physical memory limit (Gigabytes)
+CONFIG_MAXRAM_1G0
+ This option sets the maximum size of physical RAM in an 80x86 family
+ system that will be used by the kernel.
+
+ IMPORTANT: It should be noted that on this family of processors,
+ there is an effective limit of 4 Gigabytes for the combined physical
+ and virtual memory, and user processes are therefore limited to the
+ difference between this figure and 4 Gigabytes as far as allocating
+ memory is concerned, and a small amount of memory (about 96k) is
+ taken out of the user process memory for all user processes combined.
+
+ Because of this, the setting used here should be kept as low as is
+ possible consistant with the available facilities.
+
+ If uncertain, choose "1.0".

VGA text console
CONFIG_VGA_CONSOLE
--- linux/include/asm-i386/page.h.orig Thu Apr 9 02:05:18 1998
+++ linux/include/asm-i386/page.h Thu Dec 17 20:58:28 1998
@@ -80,7 +80,11 @@
*
* which has the same constant encoded..
*/
+#ifdef CONFIG_MAXRAM
+#define __PAGE_OFFSET (CONFIG_MAXRAM<<28)
+#else
#define __PAGE_OFFSET (0xC0000000)
+#endif

#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.108 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site