public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 4level page tables for Linux
@ 2004-10-14  9:25 linux
  2004-10-14 11:15 ` Robin Holt
  2004-10-17  2:57 ` H. Peter Anvin
  0 siblings, 2 replies; 15+ messages in thread
From: linux @ 2004-10-14  9:25 UTC (permalink / raw)
  To: albert; +Cc: linux-kernel

> Numbers for all of them would be easy to deal with.
> Like this: pd1, pd2, pd3, pd4...
> 
> I'd number going toward the page, because that's
> the order in which these things get walked.

On the other hand, these extensions tend to get made to the top,
and it's confusing if, in a 2-level system, only pd3 and pd4 are used.

Perhaps a little-endian scheme (pd1 = pte, pt2=pmd, pd4=pgd) would
be better after all.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: 4level page tables for Linux
@ 2004-10-13 23:22 Albert Cahalan
  2004-10-13 23:51 ` Andrea Arcangeli
  0 siblings, 1 reply; 15+ messages in thread
From: Albert Cahalan @ 2004-10-13 23:22 UTC (permalink / raw)
  To: andrea; +Cc: linux-kernel mailing list, ak

> after you add the 4level, locking will become
> necessary for the pgd, but it's still not needed
> for the pml4.
>
> I'm not very excited about changing the naming,
> of the pgd/pmd/pte so I like to keep it like it is now.
>
> peraphs we could consider pgd4 instead of pml4.
> What does "pml" stands for?

The "pmd" one is certainly nonsense now.
It means "page middle directory".

Numbers for all of them would be easy to deal with.
Like this: pd1, pd2, pd3, pd4...

I'd number going toward the page, because that's
the order in which these things get walked.



^ permalink raw reply	[flat|nested] 15+ 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; 15+ 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] 15+ messages in thread

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

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14  9:25 4level page tables for Linux linux
2004-10-14 11:15 ` Robin Holt
2004-10-17  2:57 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2004-10-13 23:22 Albert Cahalan
2004-10-13 23:51 ` Andrea Arcangeli
2004-10-14  1:15   ` Albert Cahalan
2004-10-12 13:59 Andi Kleen
2004-10-12 18:48 ` Dave Hansen
2004-10-12 19:03   ` Andi Kleen
2004-10-13 18:41   ` 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

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