linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jeff V. Merkey" <jmerkey@wolfmountaingroup.com>
To: Bernd Eckenfels <be-news06@lina.inka.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Re: 2G memory split
Date: Tue, 10 Jan 2006 09:30:58 -0700	[thread overview]
Message-ID: <43C3E142.1080206@wolfmountaingroup.com> (raw)
In-Reply-To: <E1EwNc8-00063F-00@calista.inka.de>

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

Bernd Eckenfels wrote:


Here are the patches I use for the splitting.  They work well.    The 
methods employed in Red Hat ES are far better and I am surprised
no one has simply integrated those patches into the kernel which are 4GB 
/ 4GB  kernel/user. 

Jeff

>Mark Lord <lkml@rtr.ca> wrote:
>  
>
>>So, the patch would now look like this:
>>    
>>
>
>can we please state something what the 3G_OPT is suppsoed to do? Is this "optimzed for 1GB Real RAM"? Should this be something like "2.5G" instead?
>
>  
>
>>+       config VMSPLIT_3G_OPT
>>+               bool "3G/1G user/kernel split (for full 1G low memory)"
>>    
>>
>
>  
>
>>+       default 0xC0000000
>>+       default 0xB0000000 if VMSPLIT_3G_OPT
>>+       default 0x78000000 if VMSPLIT_2G
>>+       default 0x40000000 if VMSPLIT_1G
>>    
>>
>
>  
>


[-- Attachment #2: linux-highmem-2.6.10-01-18-05.patch --]
[-- Type: text/x-patch, Size: 3487 bytes --]

diff -Naur ./arch/i386/Kconfig ../linux-2.6.10-ds/./arch/i386/Kconfig
--- ./arch/i386/Kconfig	2004-12-24 14:34:01.000000000 -0700
+++ ../linux-2.6.10-ds/./arch/i386/Kconfig	2005-01-18 11:43:27.096386256 -0700
@@ -730,6 +730,25 @@
 	depends on HIGHMEM64G
 	default y
 
+choice
+	prompt "User address space size"
+
+config USER_3GB
+        depends on X86
+	bool "3GB User Address Space"
+	default y if (X86)
+
+config USER_2GB
+        depends on X86
+	bool "2GB User Address Space"
+
+config USER_1GB
+        depends on X86
+	bool "1GB User Address Space"
+
+endchoice
+
+
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation and Scheduler Support"
diff -Naur ./include/asm-generic/page_offset.h ../linux-2.6.10-ds/./include/asm-generic/page_offset.h
--- ./include/asm-generic/page_offset.h	1969-12-31 17:00:00.000000000 -0700
+++ ../linux-2.6.10-ds/./include/asm-generic/page_offset.h	2005-01-18 11:43:27.000000000 -0700
@@ -0,0 +1,24 @@
+
+#include <linux/config.h>
+
+#ifdef __ASSEMBLY__
+
+#if defined(CONFIG_USER_1GB)
+#define PAGE_OFFSET_RAW 0x40000000
+#elif defined(CONFIG_USER_2GB)
+#define PAGE_OFFSET_RAW 0x80000000
+#elif defined(CONFIG_USER_3GB)
+#define PAGE_OFFSET_RAW 0xC0000000
+#endif
+
+#else
+
+#if defined(CONFIG_USER_1GB)
+#define PAGE_OFFSET_RAW 0x40000000UL
+#elif defined(CONFIG_USER_2GB)
+#define PAGE_OFFSET_RAW 0x80000000UL
+#elif defined(CONFIG_USER_3GB)
+#define PAGE_OFFSET_RAW 0xC0000000UL
+#endif
+
+#endif
diff -Naur ./include/asm-generic/vmlinux.lds.h ../linux-2.6.10-ds/./include/asm-generic/vmlinux.lds.h
--- ./include/asm-generic/vmlinux.lds.h	2004-12-24 14:33:50.000000000 -0700
+++ ../linux-2.6.10-ds/./include/asm-generic/vmlinux.lds.h	2005-01-18 11:43:27.000000000 -0700
@@ -1,3 +1,6 @@
+
+#include <asm-generic/page_offset.h>
+
 #ifndef LOAD_OFFSET
 #define LOAD_OFFSET 0
 #endif
diff -Naur ./include/asm-i386/page.h ../linux-2.6.10-ds/./include/asm-i386/page.h
--- ./include/asm-i386/page.h	2004-12-24 14:34:01.000000000 -0700
+++ ../linux-2.6.10-ds/./include/asm-i386/page.h	2005-01-18 11:43:27.000000000 -0700
@@ -121,9 +121,11 @@
 #endif /* __ASSEMBLY__ */
 
 #ifdef __ASSEMBLY__
-#define __PAGE_OFFSET		(0xC0000000)
+#include <asm-generic/page_offset.h>
+#define __PAGE_OFFSET		(PAGE_OFFSET_RAW)
 #else
-#define __PAGE_OFFSET		(0xC0000000UL)
+#include <asm-generic/page_offset.h>
+#define __PAGE_OFFSET		(PAGE_OFFSET_RAW)
 #endif
 
 
diff -Naur ./mem.err ../linux-2.6.10-ds/./mem.err
--- ./mem.err	1969-12-31 17:00:00.000000000 -0700
+++ ../linux-2.6.10-ds/./mem.err	2005-01-18 11:43:27.000000000 -0700
@@ -0,0 +1,7 @@
+patching file arch/i386/Kconfig
+Hunk #1 succeeded at 730 (offset 6 lines).
+patching file include/asm-generic/page_offset.h
+patching file include/asm-generic/vmlinux.lds.h
+patching file include/asm-i386/page.h
+patching file mm/memory.c
+Hunk #1 succeeded at 120 (offset 1 line).
diff -Naur ./mm/memory.c ../linux-2.6.10-ds/./mm/memory.c
--- ./mm/memory.c	2005-01-18 11:25:26.000000000 -0700
+++ ../linux-2.6.10-ds/./mm/memory.c	2005-01-18 11:43:27.000000000 -0700
@@ -120,8 +120,7 @@
 
 static inline void free_one_pgd(struct mmu_gather *tlb, pgd_t * dir)
 {
-	int j;
-	pmd_t * pmd;
+	pmd_t *pmd, *md, *emd;
 
 	if (pgd_none(*dir))
 		return;
@@ -132,8 +131,8 @@
 	}
 	pmd = pmd_offset(dir, 0);
 	pgd_clear(dir);
-	for (j = 0; j < PTRS_PER_PMD ; j++)
-		free_one_pmd(tlb, pmd+j);
+	for (md = pmd, emd = pmd + PTRS_PER_PMD; md < emd; md++) 
+	   free_one_pmd(tlb, md);
 	pmd_free_tlb(tlb, pmd);
 }
 

[-- Attachment #3: linux-highmem-split-2.6.9-10-18-04.patch --]
[-- Type: text/x-patch, Size: 3018 bytes --]

diff -Naur ./arch/i386/Kconfig ../linux-2.6.9-mdb/./arch/i386/Kconfig
--- ./arch/i386/Kconfig	2004-10-18 15:53:22.000000000 -0600
+++ ../linux-2.6.9-mdb/./arch/i386/Kconfig	2004-10-18 11:52:51.529009552 -0600
@@ -724,6 +724,25 @@
 	depends on HIGHMEM64G
 	default y
 
+choice
+	prompt "User address space size"
+
+config USER_3GB
+        depends on X86
+	bool "3GB User Address Space"
+	default y if (X86)
+
+config USER_2GB
+        depends on X86
+	bool "2GB User Address Space"
+
+config USER_1GB
+        depends on X86
+	bool "1GB User Address Space"
+
+endchoice
+
+
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation and Scheduler Support"
diff -Naur ./include/asm-generic/page_offset.h ../linux-2.6.9-mdb/./include/asm-generic/page_offset.h
--- ./include/asm-generic/page_offset.h	1969-12-31 17:00:00.000000000 -0700
+++ ../linux-2.6.9-mdb/./include/asm-generic/page_offset.h	2004-10-18 11:52:51.530009400 -0600
@@ -0,0 +1,24 @@
+
+#include <linux/config.h>
+
+#ifdef __ASSEMBLY__
+
+#if defined(CONFIG_USER_1GB)
+#define PAGE_OFFSET_RAW 0x40000000
+#elif defined(CONFIG_USER_2GB)
+#define PAGE_OFFSET_RAW 0x80000000
+#elif defined(CONFIG_USER_3GB)
+#define PAGE_OFFSET_RAW 0xC0000000
+#endif
+
+#else
+
+#if defined(CONFIG_USER_1GB)
+#define PAGE_OFFSET_RAW 0x40000000UL
+#elif defined(CONFIG_USER_2GB)
+#define PAGE_OFFSET_RAW 0x80000000UL
+#elif defined(CONFIG_USER_3GB)
+#define PAGE_OFFSET_RAW 0xC0000000UL
+#endif
+
+#endif
diff -Naur ./include/asm-generic/vmlinux.lds.h ../linux-2.6.9-mdb/./include/asm-generic/vmlinux.lds.h
--- ./include/asm-generic/vmlinux.lds.h	2004-10-18 15:53:08.000000000 -0600
+++ ../linux-2.6.9-mdb/./include/asm-generic/vmlinux.lds.h	2004-10-18 11:52:51.545007120 -0600
@@ -1,3 +1,6 @@
+
+#include <asm-generic/page_offset.h>
+
 #ifndef LOAD_OFFSET
 #define LOAD_OFFSET 0
 #endif
diff -Naur ./include/asm-i386/page.h ../linux-2.6.9-mdb/./include/asm-i386/page.h
--- ./include/asm-i386/page.h	2004-10-18 15:53:22.000000000 -0600
+++ ../linux-2.6.9-mdb/./include/asm-i386/page.h	2004-10-18 11:52:51.545007120 -0600
@@ -121,9 +121,11 @@
 #endif /* __ASSEMBLY__ */
 
 #ifdef __ASSEMBLY__
-#define __PAGE_OFFSET		(0xC0000000)
+#include <asm-generic/page_offset.h>
+#define __PAGE_OFFSET		(PAGE_OFFSET_RAW)
 #else
-#define __PAGE_OFFSET		(0xC0000000UL)
+#include <asm-generic/page_offset.h>
+#define __PAGE_OFFSET		(PAGE_OFFSET_RAW)
 #endif
 
 
diff -Naur ./mm/memory.c ../linux-2.6.9-mdb/./mm/memory.c
--- ./mm/memory.c	2004-10-18 11:46:59.000000000 -0600
+++ ../linux-2.6.9-mdb/./mm/memory.c	2004-10-18 11:52:51.547006816 -0600
@@ -119,8 +119,7 @@
 
 static inline void free_one_pgd(struct mmu_gather *tlb, pgd_t * dir)
 {
-	int j;
-	pmd_t * pmd;
+	pmd_t *pmd, *md, *emd;
 
 	if (pgd_none(*dir))
 		return;
@@ -131,8 +130,8 @@
 	}
 	pmd = pmd_offset(dir, 0);
 	pgd_clear(dir);
-	for (j = 0; j < PTRS_PER_PMD ; j++)
-		free_one_pmd(tlb, pmd+j);
+	for (md = pmd, emd = pmd + PTRS_PER_PMD; md < emd; md++) 
+	   free_one_pmd(tlb, md);
 	pmd_free_tlb(tlb, pmd);
 }
 

  reply	other threads:[~2006-01-10 18:15 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 13:47       ` Jens Axboe
2006-01-10 14:39       ` Jens Axboe
2006-01-10 14:44         ` Ingo Molnar
2006-01-10 15:03           ` [PATCH] Address space split configuration Jens Axboe
2006-01-10 15:11             ` Mark Lord
2006-01-10 15:24             ` Mikael Pettersson
2006-01-10 16:14         ` 2G memory split Linus Torvalds
2006-01-10 16:40           ` Mark Lord
2006-01-10 16:52             ` Linus Torvalds
2006-01-10 18:33               ` Coywolf Qi Hunt
2006-01-10 17:07           ` Mark Lord
2006-01-10 17:28             ` Linus Torvalds
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
2006-02-07 12:19                                           ` RFC: add an ADVANCED_USER option Adrian Bunk
2006-02-07 14:05                                             ` Ulrich Mueller
2006-02-07 14:42                                               ` Adrian Bunk
2006-02-09 16:06                                                 ` Jan Engelhardt
2006-01-10 17:48             ` 2G memory split Bernd Eckenfels
2006-01-10 16:30               ` Jeff V. Merkey [this message]
2006-01-10 18:50                 ` [PATCH] " Lennart Sorensen
2006-01-10 17:13                   ` Jeff V. Merkey
2006-01-10 19:42               ` Jens Axboe
2006-01-10 20:17                 ` Bernd Eckenfels
2006-01-10 20:28                   ` Jens Axboe
2006-01-11  8:39                     ` Bernd Eckenfels
2006-01-11 10:06                       ` Jens Axboe
2006-01-10 18:14           ` Martin Bligh
2006-01-10 18:34             ` Linus Torvalds
2006-01-10 16:56               ` Jeff V. Merkey
2006-01-10 17:01                 ` Jeff V. Merkey
2006-01-10 18:45                 ` Mark Lord
2006-01-10 18:46                 ` Martin Bligh
2006-01-10 18:58                 ` Jens Axboe
2006-01-10 17:17                   ` Jeff V. Merkey
2006-01-10 20:55                 ` Alan Cox
2006-01-10 19:12                   ` Jeff V. Merkey
2006-01-10 21:02                     ` Jens Axboe
2006-01-10 19:30                       ` Jeff V. Merkey
2006-01-10 18:39               ` Martin Bligh
2006-01-10 18:55               ` Dave Hansen
2006-01-10 19:01                 ` Mark Lord
2006-01-10 19:05                   ` Dave Hansen
2006-01-10 17:07         ` Sergey Vlasov
2006-04-10 14:11           ` Kirill Korotaev
2006-04-10 14:39             ` Mark Lord
2006-01-10 18:28         ` Coywolf Qi Hunt
2006-01-10 13:47 ` Mikael Pettersson
2006-01-10 13:54   ` Jens Axboe
2006-01-10 14:09     ` Gerd Hoffmann
2006-01-10 14:21       ` Jens Axboe
2006-01-10 14:25       ` Jens Axboe
2006-01-10 20:42   ` Jan Engelhardt
2006-01-11  0:25     ` Con Kolivas
2006-01-10 14:12 ` Mark Lord
2006-01-10 14:22   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43C3E142.1080206@wolfmountaingroup.com \
    --to=jmerkey@wolfmountaingroup.com \
    --cc=be-news06@lina.inka.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).