public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 1-2-3 GB
@ 2002-01-12  5:45 rwhron
  2002-01-12  7:32 ` H. Peter Anvin
  2002-01-12 11:56 ` Andrea Arcangeli
  0 siblings, 2 replies; 28+ messages in thread
From: rwhron @ 2002-01-12  5:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: andrea


Patch to have 1-3 GB of virtual memory and not show up as highmem:

Tested on uniprocessor Athlon with 1024 MB RAM and 1027 MB swap.
Caused no LTP (ltp-20020108) regressions.
Did a test like http://marc.theaimsgroup.com/?l=linux-kernel&m=101064072924424&w=2
This time the test completed in 51 minutes (11% faster) and I had setiathome running
the whole time and listened to 12 mp3s sampled at 128k.

dmesg|grep Mem
Memory: 1029848k/1048512k available (1054k kernel code, 18276k reserved, 260k data, 240k init, 0k highmem)

egrep '^CONFIG_HIGH|GB' /usr/src/linux/.config
CONFIG_HIGHMEM4G=y
CONFIG_HIGHMEM=y
# CONFIG_1GB is not set
CONFIG_2GB=y
# CONFIG_3GB is not set
# CONFIG_05GB is not set

uname -a
Linux rushmore 2.4.18pre2aa2-2g #2 Fri Jan 11 22:25:55 EST 2002 i686 unknown

Derived from:
htty://kernelnewbies.org/kernels/rh72/SOURCES/linux-2.4.2-vm-1-2-3-gbyte.patch
Some parts of the patch above are already in the mainline trees.

Patch below applies to 2.4.18pre2aa2:

diff -nur linux.aa2/Rules.make linux/Rules.make
--- linux.aa2/Rules.make        Tue Mar  6 22:31:01 2001
+++ linux/Rules.make    Fri Jan 11 22:00:57 2002
@@ -212,6 +212,7 @@
 #
 # Added the SMP separator to stop module accidents between uniprocessor
 # and SMP Intel boxes - AC - from bits by Michael Chastain
+# Added separator for different PAGE_OFFSET memory models - Ingo.
 #

 ifdef CONFIG_SMP
@@ -220,6 +221,22 @@
        genksyms_smp_prefix :=
 endif

+ifdef CONFIG_2GB
+ifdef CONFIG_SMP
+       genksyms_smp_prefix := -p smp_2gig_
+else
+       genksyms_smp_prefix := -p 2gig_
+endif
+endif
+
+ifdef CONFIG_3GB
+ifdef CONFIG_SMP
+       genksyms_smp_prefix := -p smp_3gig_
+else
+       genksyms_smp_prefix := -p 3gig_
+endif
+endif
+
 $(MODINCL)/%.ver: %.c
        @if [ ! -r $(MODINCL)/$*.stamp -o $(MODINCL)/$*.stamp -ot $< ]; then \
                echo '$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $<'; \
diff -nur linux.aa2/arch/i386/config.in linux/arch/i386/config.in
--- linux.aa2/arch/i386/config.in       Fri Jan 11 20:57:58 2002
+++ linux/arch/i386/config.in   Fri Jan 11 22:20:32 2002
@@ -169,7 +169,11 @@
 if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
    define_bool CONFIG_X86_PAE y
 else
-   bool '3.5GB user address space' CONFIG_05GB
+   choice 'Maximum Virtual Memory' \
+       "3GB            CONFIG_1GB \
+        2GB            CONFIG_2GB \
+        1GB            CONFIG_3GB \
+        05GB           CONFIG_05GB" 3GB
 fi
 if [ "$CONFIG_NOHIGHMEM" = "y" ]; then
    define_bool CONFIG_NO_PAGE_VIRTUAL y
@@ -179,6 +183,7 @@
    bool 'HIGHMEM I/O support (EXPERIMENTAL)' CONFIG_HIGHIO
 fi

+
 bool 'Math emulation' CONFIG_MATH_EMULATION
 bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR
 bool 'Symmetric multi-processing support' CONFIG_SMP
diff -nur linux.aa2/include/asm-i386/page_offset.h linux/include/asm-i386/page_offset.h
--- linux.aa2/include/asm-i386/page_offset.h    Fri Jan 11 20:57:58 2002
+++ linux/include/asm-i386/page_offset.h        Fri Jan 11 21:20:48 2002
@@ -1,6 +1,10 @@
 #include <linux/config.h>
-#ifndef CONFIG_05GB
-#define PAGE_OFFSET_RAW 0xC0000000
-#else
+#ifdef CONFIG_05GB
 #define PAGE_OFFSET_RAW 0xE0000000
+#elif defined(CONFIG_1GB)
+#define PAGE_OFFSET_RAW 0xC0000000
+#elif defined(CONFIG_2GB)
+#define PAGE_OFFSET_RAW 0x80000000
+#elif defined(CONFIG_3GB)
+#define PAGE_OFFSET_RAW 0x40000000
 #endif

-- 
Randy Hron


^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: BIO Usage Error or Conflicting Designs
@ 2002-01-13 21:09 Manfred Spraul
  2002-01-14  7:23 ` Jens Axboe
  0 siblings, 1 reply; 28+ messages in thread
From: Manfred Spraul @ 2002-01-13 21:09 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Andre Hedrick

 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> 
> Is this with the highmem debug stuff enabled? That's the only way I can
> see this BUG triggering, otherwise q->bounce_pfn _cannot_ be smaller
> than the max_pfn.
> 
Have you tested that?

Unless I misread arch/i386/kernel/setup.c, line 740 to 760, max_pfn is
the upper end of the highmem area, if highmem is configured.
For non-highmem setup, it's set to min(system_memory, 4 GB).
It was a local variable within setup_arch, and someone made it a global
variable.

I.e. max_pfn is 1 GB with Andre's setup.

His patch doesn't touch the bounce limit, the default limit from
blk_queue_make_request() is used: BLK_BOUNCE_HIGH, which is max_low_pfn.

max_low_pfn is 896 MB.

--> BUG in create_bounce(), because a request comes in with a bounce
limit less than the total system memory, and no highmem configured.

--
	Manfred

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

end of thread, other threads:[~2002-01-19  0:23 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-12  5:45 [PATCH] 1-2-3 GB rwhron
2002-01-12  7:32 ` H. Peter Anvin
2002-01-12 13:17   ` Andrea Arcangeli
2002-01-12 17:26     ` Albert D. Cahalan
2002-01-12 17:42       ` Andrea Arcangeli
2002-01-12 18:28         ` Albert D. Cahalan
2002-01-12 19:07           ` BIO Usage Error or Conflicting Designs Andre Hedrick
2002-01-12 20:05             ` Jens Axboe
2002-01-13  1:15               ` Andre Hedrick
2002-01-13 12:59                 ` Jens Axboe
2002-01-13 19:59                   ` Andre Hedrick
2002-01-14  6:42                     ` Jens Axboe
2002-01-12 20:59     ` [PATCH] 1-2-3 GB H. Peter Anvin
2002-01-12 11:56 ` Andrea Arcangeli
2002-01-12 15:50   ` rwhron
2002-01-12 19:22   ` Hugh Dickins
2002-01-12 21:02     ` Andrew Morton
2002-01-13 20:24     ` H. Peter Anvin
2002-01-13 23:11       ` Marvin Justice
2002-01-14  0:03         ` H. Peter Anvin
2002-01-14  0:46           ` Alan Cox
2002-01-14  2:21       ` Rik van Riel
2002-01-18 21:18     ` Pavel Machek
2002-01-19  0:24       ` Hugh Dickins
2002-01-12 21:41   ` rwhron
2002-01-12 22:34   ` rwhron
  -- strict thread matches above, loose matches on Subject: below --
2002-01-13 21:09 BIO Usage Error or Conflicting Designs Manfred Spraul
2002-01-14  7:23 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox