From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Bligh <mbligh@google.com>,
linux-mm@kvack.org, Andi Kleen <ak@suse.de>,
Dave Hansen <hansendc@us.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 3/3] IA64: Implement SPARSE_VIRTUAL
Date: Mon, 2 Apr 2007 17:38:48 -0700 (PDT) [thread overview]
Message-ID: <20070403003848.829.88005.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070403003837.829.31019.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.
I have another patch in testing that uses granule sized 16MB pages to map
the memmap but this would require changes to the interrupt vector table
and there are certain discussions that would need to take place
before we can accept such a large page size for the memmap. That version
is better because is improves IA64 performance by reducing TLB pressure.
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>
prev parent reply other threads:[~2007-04-03 0:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 0:38 [PATCH 1/1] Generic Virtual Memmap suport for SPARSEMEM V2 Christoph Lameter
2007-04-03 0:38 ` [PATCH 2/3] x86_64: Implement SPARSE_VIRTUAL Christoph Lameter
2007-04-03 0:38 ` Christoph Lameter [this message]
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=20070403003848.829.88005.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-arch@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