mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: linux-kernel@vger.kernel.org
Cc: akpm@digeo.com
Subject: 4level page tables for Linux
Date: Tue, 12 Oct 2004 15:59:19 +0200	[thread overview]
Message-ID: <20041012135919.GB20992@wotan.suse.de> (raw)


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

             reply	other threads:[~2004-10-12 13:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12 13:59 Andi Kleen [this message]
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
2004-10-13 18:41   ` 4level page tables for Linux Andrea Arcangeli
2004-10-13 19:35     ` Andi Kleen
2004-10-13 20:04       ` Andrea Arcangeli
2004-10-18 17:02         ` Christoph Lameter
2004-10-18 17:21           ` Andi Kleen
2004-10-18 17:38           ` Andrea Arcangeli
2004-10-13 23:22 Albert Cahalan
2004-10-13 23:51 ` Andrea Arcangeli
2004-10-14  1:15   ` Albert Cahalan
2004-10-14  9:25 linux
2004-10-14 11:15 ` Robin Holt
2004-10-17  2:57 ` H. Peter Anvin

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=20041012135919.GB20992@wotan.suse.de \
    --to=ak@suse.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®