linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: linux-mm@kvack.org
Cc: linux-arch@vger.kernel.org, Nick Piggin <npiggin@suse.de>,
	Christoph Lameter <clameter@sgi.com>, Mel Gorman <mel@csn.ul.ie>,
	Andy Whitcroft <apw@shadowen.org>
Subject: [PATCH 5/8] IA64: SPARSEMEM_VMEMMAP 16K page size support
Date: Wed, 23 May 2007 00:00:31 +0100	[thread overview]
Message-ID: <E1HqdLD-0003fb-PF@hellhawk.shadowen.org> (raw)
In-Reply-To: <exportbomb.1179873917@pinky>

Equip IA64 sparsemem with a virtual memmap. This is similar to the
existing CONFIG_VIRTUAL_MEM_MAP functionality for DISCONTIGMEM.
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.

This should replace CONFIG_VIRTUAL_MEM_MAP long term.

From: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
---
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index de1bff6..9d0d101 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -355,6 +355,10 @@ config ARCH_SPARSEMEM_ENABLE
 	def_bool y
 	depends on ARCH_DISCONTIGMEM_ENABLE
 
+config SPARSEMEM_VMEMMAP
+	def_bool y
+	depends on SPARSEMEM
+
 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
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index 670b706..366c34b 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -236,8 +236,14 @@ ia64_phys_addr_valid (unsigned long addr)
 # define VMALLOC_END		vmalloc_end
   extern unsigned long vmalloc_end;
 #else
+#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
+#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>

  parent reply	other threads:[~2007-05-22 23:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 22:57 [PATCH 0/8] Sparsemem Virtual Memmap V4 Andy Whitcroft
2007-05-22 22:58 ` [PATCH 1/8] sparsemem: clean up spelling error in comments Andy Whitcroft
2007-05-22 22:58 ` [PATCH 2/8] sparsemem: record when a section has a valid mem_map Andy Whitcroft
2007-05-22 22:59 ` [PATCH 3/8] Generic Virtual Memmap support for SPARSEMEM V4 Andy Whitcroft
2007-05-23  5:15   ` Christoph Lameter
2007-05-23  7:07     ` Stephen Rothwell
2007-05-22 23:00 ` [PATCH 4/8] x86_64: SPARSEMEM_VMEMMAP 2M page size support Andy Whitcroft
2007-05-22 23:00 ` Andy Whitcroft [this message]
2007-05-23  5:12   ` [PATCH 5/8] IA64: SPARSEMEM_VMEMMAP 16K " Christoph Lameter
2007-05-22 23:01 ` [PATCH 6/8] IA64: SPARSEMEM_VMEMMAP 16M " Andy Whitcroft
2007-05-22 23:01 ` [PATCH 7/8] SPARC64: SPARSEMEM_VMEMMAP support Andy Whitcroft
2007-05-22 23:02 ` [PATCH 8/8] ppc64: " Andy Whitcroft
2007-05-22 23:52 ` [PATCH 0/8] Sparsemem Virtual Memmap V4 Christoph Lameter
2007-05-23  0:00 ` Christoph Lameter
2007-05-23  0:42 ` Christoph Lameter
2007-05-23  4:16 ` David Miller, 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=E1HqdLD-0003fb-PF@hellhawk.shadowen.org \
    --to=apw@shadowen.org \
    --cc=clameter@sgi.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=npiggin@suse.de \
    /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