public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 4level page tables for Linux II
@ 2004-10-13  3:36 Albert Cahalan
  2004-10-13  7:22 ` Andi Kleen
  0 siblings, 1 reply; 10+ messages in thread
From: Albert Cahalan @ 2004-10-13  3:36 UTC (permalink / raw)
  To: linux-kernel mailing list; +Cc: ak

Hmmm...

pml4, pgd, pmd, pte  (kernel names)
PML4E, PDPE, PDE, PTE   (AMD hardware names)

It's kind of a mess, isn't it? It was bad enough
with the "pmd" (page middle directory, ugh) being
some random invention and everything being generally
in conflict with real hardware naming. Now you've
come up with a fourth name.

Notice that you've resorted to using a number.
Why not do that for the others too? It would
bring some order to this ever-growing collection
of arbitrary names. Like this:

pd4, pd3, pd2, pd1



^ permalink raw reply	[flat|nested] 10+ messages in thread
* 4level page tables for Linux
@ 2004-10-12 13:59 Andi Kleen
  2004-10-12 18:48 ` Dave Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2004-10-12 13:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm


I released a 4level page table patch for 2.6.9rc4.  It is available
from ftp://ftp.suse.com/pub/people/ak/4level/4level-2.6.9rc4-1.gz

It changes the Linux MM which currently only supports 3 levels of 
page tables to support a fourth level (PML4). This is needed to 
exceed more than 512GB of virtual address space per process on x86-64. 
People have been running into the 512GB limit when mmaping large files.

The patch extends all the code in the VM that walks the 3level
hierarchy to handle the fourth level too.

The patch changes x86-64 to now support 47bits (128TB) of virtual
address space per process. 

The changes are fortunately quite localized. Only mm/* had to change
(mostly in straight forward ways), drivers etc. already were well
isolated from the page tables with the get_user_pages() function.
The only exception was DRM, which needed a small patch.

Excluding the i386/x86-64 architecture specific parts the patch looks like:

 drivers/char/drm/drm_memory.h        |    3 
 fs/exec.c                            |    6 
 include/asm-generic/nopml4-page.h    |   11 
 include/asm-generic/nopml4-pgalloc.h |   21 +
 include/asm-generic/nopml4-pgtable.h |   39 ++
 include/asm-generic/pgtable.h        |    2 
 include/asm-generic/tlb.h            |    6 
 include/linux/init_task.h            |    2 
 include/linux/mm.h                   |   10 
 include/linux/sched.h                |    2 
 kernel/fork.c                        |    6 
 mm/fremap.c                          |   18 -
 mm/memory.c                          |  584 ++++++++++++++++++++++++-----------
 mm/mempolicy.c                       |   18 -
 mm/mmap.c                            |   36 +-
 mm/mprotect.c                        |   44 ++
 mm/mremap.c                          |   21 +
 mm/msync.c                           |   43 ++
 mm/rmap.c                            |   21 +
 mm/swapfile.c                        |   61 ++-
 mm/vmalloc.c                         |   85 ++++-

For architectures with less levels of page tables the code should be mostly a 
nop. 

The patch currently only supports x86-64 and i386. Other architectures
will need some changes to compile. The changes to convert an architecture
over are quite straight forward, please see the changes to i386 in
the patch. I renamed all functions that need changing so things
that are broken will not compile.

I will need some help to do this conversion because I can only test
i386 and x86-64 easily.  I can convert architectures over, but someone
will need to test the result.

Plan is to merge it into -mm* ASAP, when the major architectures

have been ported over.

-Andi

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-17  5:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-13  3:36 4level page tables for Linux II Albert Cahalan
2004-10-13  7:22 ` Andi Kleen
2004-10-13 21:42   ` Albert Cahalan
2004-10-14 16:57   ` Matthias Urlichs
2004-10-15  1:55     ` Andrew Grover
2004-10-15 13:28       ` Jörn Engel
2004-10-15 13:55         ` Matthias Urlichs
2004-10-15 23:39           ` Jörn Engel
2004-10-17  5:54             ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-10-12 13:59 4level page tables for Linux Andi Kleen
2004-10-12 18:48 ` Dave Hansen
2004-10-12 19:03   ` Andi Kleen
2004-10-12 19:08     ` 4level page tables for Linux II Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox