lkml.org 
[lkml]   [2007]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 07/30] cpu alloc: IA64 support
Typical use of per cpu memory for a small system of 8G 8p 4node is less than
64k per cpu memory. This is increasing rapidly for larger systems where we can
get up to 512k or 1M of memory used for cpu storage.

The maximum size allowed of the cpu area is 128MB of memory.

The cpu area is placed in region 5 with the kernel, vmemmap and vmalloc areas.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
arch/ia64/Kconfig | 13 +++++++++++++
include/asm-ia64/pgtable.h | 32 ++++++++++++++++++++++++++------
2 files changed, 39 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/ia64/Kconfig
===================================================================
--- linux-2.6.orig/arch/ia64/Kconfig 2007-11-15 21:24:46.991154957 -0800
+++ linux-2.6/arch/ia64/Kconfig 2007-11-16 14:43:17.277214329 -0800
@@ -99,6 +99,19 @@ config AUDIT_ARCH
bool
default y

+config CPU_AREA_VIRTUAL
+ bool
+ default y
+
+# Maximum of 128 MB cpu_alloc space per cpu
+config CPU_AREA_ORDER
+ int
+ default "13"
+
+config CPU_AREA_ALLOC_ORDER
+ int
+ default "0"
+
choice
prompt "System type"
default IA64_GENERIC
Index: linux-2.6/include/asm-ia64/pgtable.h
===================================================================
--- linux-2.6.orig/include/asm-ia64/pgtable.h 2007-11-15 21:24:47.003154534 -0800
+++ linux-2.6/include/asm-ia64/pgtable.h 2007-11-16 14:42:57.629964336 -0800
@@ -224,21 +224,41 @@ ia64_phys_addr_valid (unsigned long addr
*/


+/*
+ * Layout of RGN_GATE
+ *
+ * 47 bits wide (16kb pages)
+ *
+ * 0xa000000000000000-0xa00000200000000 8G Kernel data area
+ * 0xa000002000000000-0xa00040000000000 64T vmalloc
+ * 0xa000400000000000-0xa00060000000000 32T vmemmmap
+ * 0xa000600000000000-0xa00080000000000 32T cpu area
+ *
+ * 55 bits wide (64kb pages)
+ *
+ * 0xa000000000000000-0xa00000200000000 8G Kernel data area
+ * 0xa000002000000000-0xa04000000000000 16P vmalloc
+ * 0xa040000000000000-0xa06000000000000 8P vmemmmap
+ * 0xa060000000000000-0xa08000000000000 8P cpu area
+ */
+
#define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL)
+#define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 10)))
+
#ifdef CONFIG_VIRTUAL_MEM_MAP
-# define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
# define VMALLOC_END vmalloc_end
extern unsigned long vmalloc_end;
#else
+# define VMALLOC_END VMALLOC_END_INIT
+#endif
+
#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSEMEM_VMEMMAP)
/* SPARSEMEM_VMEMMAP uses half of vmalloc... */
-# define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 10)))
-# define vmemmap ((struct page *)VMALLOC_END)
-#else
-# define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
-#endif
+# define vmemmap ((struct page *)VMALLOC_END_INIT)
#endif

+#define CPU_AREA_BASE (RGN_BASE(RGN_GATE) + (3UL << (4*PAGE_SHIFT - 11)))
+
/* fs/proc/kcore.c */
#define kc_vaddr_to_offset(v) ((v) - RGN_BASE(RGN_GATE))
#define kc_offset_to_vaddr(o) ((o) + RGN_BASE(RGN_GATE))
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-17 00:17    [W:0.254 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site