lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070403003843.829.50704.sendpatchset@schroedinger.engr.sgi.com>
Date:	Mon,  2 Apr 2007 17:38:43 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	akpm@...ux-foundation.org
Cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	Martin Bligh <mbligh@...gle.com>, linux-mm@...ck.org,
	Andi Kleen <ak@...e.de>, Christoph Lameter <clameter@....com>,
	Dave Hansen <hansendc@...ibm.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: [PATCH 2/3] x86_64: Implement SPARSE_VIRTUAL

x86_64 implement SPARSE_VIRTUAL

x86_64 is using 2M page table entries to map its 1-1 kernel space.
We implement the virtual memmap also using 2M page table entries.
So there is no difference at all to FLATMEM. Both schemes require
a page table and a TLB for each 2MB. FLATMEM still references memory
since the mem_map pointer itself a variable. SPARSE_VIRTUAL uses a
constant for vmemmap. Thus no memory reference. SPARSE_VIRTUAL should
be superior to even FLATMEM.

With this SPARSEMEM becomes the most efficient way of handling
virt_to_page, pfn_to_page and friends for UP, SMP and NUMA on
x86_64.

Signed-off-by: Christoph Lameter <clameter@....com>

Index: linux-2.6.21-rc5-mm3/include/asm-x86_64/page.h
===================================================================
--- linux-2.6.21-rc5-mm3.orig/include/asm-x86_64/page.h	2007-04-02 12:25:03.000000000 -0700
+++ linux-2.6.21-rc5-mm3/include/asm-x86_64/page.h	2007-04-02 12:27:16.000000000 -0700
@@ -127,6 +127,7 @@
 	 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 
 #define __HAVE_ARCH_GATE_AREA 1	
+#define vmemmap ((struct page *)0xffffe20000000000UL)
 
 #include <asm-generic/memory_model.h>
 #include <asm-generic/page.h>
Index: linux-2.6.21-rc5-mm3/Documentation/x86_64/mm.txt
===================================================================
--- linux-2.6.21-rc5-mm3.orig/Documentation/x86_64/mm.txt	2007-04-02 12:25:03.000000000 -0700
+++ linux-2.6.21-rc5-mm3/Documentation/x86_64/mm.txt	2007-04-02 12:27:16.000000000 -0700
@@ -9,6 +9,7 @@
 ffff810000000000 - ffffc0ffffffffff (=46 bits) direct mapping of all phys. memory
 ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
 ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
+ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map
 ... unused hole ...
 ffffffff80000000 - ffffffff82800000 (=40 MB)   kernel text mapping, from phys 0
 ... unused hole ...
Index: linux-2.6.21-rc5-mm3/arch/x86_64/Kconfig
===================================================================
--- linux-2.6.21-rc5-mm3.orig/arch/x86_64/Kconfig	2007-04-02 12:27:13.000000000 -0700
+++ linux-2.6.21-rc5-mm3/arch/x86_64/Kconfig	2007-04-02 12:28:13.000000000 -0700
@@ -392,6 +392,12 @@
 	def_bool y
 	depends on (NUMA || EXPERIMENTAL)
 
+config SPARSE_VIRTUAL
+	def_bool y
+
+config ARCH_SUPPORTS_PMD_MAPPING
+	def_bool y
+
 config ARCH_MEMORY_PROBE
 	def_bool y
 	depends on MEMORY_HOTPLUG
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ