From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Bligh <mbligh@google.com>,
linux-mm@kvack.org, Christoph Lameter <clameter@sgi.com>,
Dave Hansen <hansendc@us.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Andi Kleen <ak@suse.de>
Subject: [PATCH 3/4] IA64: SPARSE_VIRTUAL 16K page size support
Date: Wed, 4 Apr 2007 16:06:30 -0700 (PDT) [thread overview]
Message-ID: <20070404230629.20292.89714.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070404230619.20292.4475.sendpatchset@schroedinger.engr.sgi.com>
[IA64] Sparse virtual implementation
Equip IA64 sparsemem with a virtual memmap. This is similar to the existing
CONFIG_VMEMMAP functionality for discontig. It uses a page size mapping.
This is provided as a minimally intrusive solution. We split the
128TB VMALLOC area into two 64TB areas and use one for the virtual memmap.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.21-rc5-mm2/arch/ia64/Kconfig
===================================================================
--- linux-2.6.21-rc5-mm2.orig/arch/ia64/Kconfig 2007-04-02 16:15:29.000000000 -0700
+++ linux-2.6.21-rc5-mm2/arch/ia64/Kconfig 2007-04-02 16:15:50.000000000 -0700
@@ -350,6 +350,10 @@ config ARCH_SPARSEMEM_ENABLE
def_bool y
depends on ARCH_DISCONTIGMEM_ENABLE
+config SPARSE_VIRTUAL
+ def_bool y
+ depends on ARCH_SPARSEMEM_ENABLE
+
config ARCH_DISCONTIGMEM_DEFAULT
def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
depends on ARCH_DISCONTIGMEM_ENABLE
Index: linux-2.6.21-rc5-mm2/include/asm-ia64/page.h
===================================================================
--- linux-2.6.21-rc5-mm2.orig/include/asm-ia64/page.h 2007-04-02 16:15:29.000000000 -0700
+++ linux-2.6.21-rc5-mm2/include/asm-ia64/page.h 2007-04-02 16:15:50.000000000 -0700
@@ -106,6 +106,9 @@ extern int ia64_pfn_valid (unsigned long
# define ia64_pfn_valid(pfn) 1
#endif
+#define vmemmap ((struct page *)(RGN_BASE(RGN_GATE) + \
+ (1UL << (4*PAGE_SHIFT - 10))))
+
#ifdef CONFIG_VIRTUAL_MEM_MAP
extern struct page *vmem_map;
#ifdef CONFIG_DISCONTIGMEM
Index: linux-2.6.21-rc5-mm2/include/asm-ia64/pgtable.h
===================================================================
--- linux-2.6.21-rc5-mm2.orig/include/asm-ia64/pgtable.h 2007-04-02 16:15:29.000000000 -0700
+++ linux-2.6.21-rc5-mm2/include/asm-ia64/pgtable.h 2007-04-02 16:15:50.000000000 -0700
@@ -236,8 +236,13 @@ ia64_phys_addr_valid (unsigned long addr
# define VMALLOC_END vmalloc_end
extern unsigned long vmalloc_end;
#else
+#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSE_VIRTUAL)
+/* SPARSE_VIRTUAL uses half of vmalloc... */
+# define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 10)))
+#else
# define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
#endif
+#endif
/* fs/proc/kcore.c */
#define kc_vaddr_to_offset(v) ((v) - RGN_BASE(RGN_GATE))
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-04-04 23:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 23:06 [PATCH 1/4] Generic Virtual Memmap suport for SPARSEMEM V3 Christoph Lameter
2007-04-04 23:06 ` [PATCH 2/4] x86_64: SPARSE_VIRTUAL 2M page size support Christoph Lameter
2007-04-04 23:06 ` Christoph Lameter [this message]
2007-04-04 23:06 ` [PATCH 4/4] IA64: SPARSE_VIRTUAL 16M " Christoph Lameter
2007-04-05 22:50 ` Luck, Tony
2007-04-05 23:10 ` David Miller, Luck, Tony
2007-04-06 17:16 ` Christoph Lameter
2007-04-05 21:29 ` [PATCH 1/4] Generic Virtual Memmap suport for SPARSEMEM V3 David Miller, Christoph Lameter
2007-04-05 22:27 ` Christoph Lameter
2007-04-10 10:43 ` Andy Whitcroft
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=20070404230629.20292.89714.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hansendc@us.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mbligh@google.com \
/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