2002-06-26 22:02:52

by Dan Sturtevant

[permalink] [raw]
Subject: x86 Page Sizes


I know the x86 linux kernel has 4K pages in userspace and 4M pages in
kernel space. These two sizes seem to be limitations of the intel
architecture (I think).

Does anyone know a way to increase the userspace page size above 4K?
Are there any patches for a 4M userspace pagesize?

Thanks,
Dan


2002-06-26 22:16:30

by Robert Love

[permalink] [raw]
Subject: Re: x86 Page Sizes

On Wed, 2002-06-26 at 18:02, Dan Sturtevant wrote:
>
> I know the x86 linux kernel has 4K pages in userspace and 4M pages in
> kernel space. These two sizes seem to be limitations of the intel
> architecture (I think).
>
> Does anyone know a way to increase the userspace page size above 4K?
> Are there any patches for a 4M userspace pagesize?

Kernel has 4K pages in user and kernel space. It is the same address
space and segment, just uses MMU protection.

x86 does 4K pages.

Robert Love

2002-06-27 06:37:41

by Peter Svensson

[permalink] [raw]
Subject: Re: x86 Page Sizes

On 26 Jun 2002, Robert Love wrote:

> Kernel has 4K pages in user and kernel space. It is the same address
> space and segment, just uses MMU protection.
>
> x86 does 4K pages.

The x86 cpus can use 4K or 4M pages in the hardware. The 4M pages are
restricted to the kernel in Linux due to various problems. This has been
discussed on this list a while ago. The thread was called "Have the 2.4
kernel memory management problems on large machines been fixed?" the last
time around.

4M pages are useful to minimize tlb misses which can be costly for some
algorithms.

Peter
--
Peter Svensson ! Pgp key available by finger, fingerprint:
<[email protected]> ! 8A E9 20 98 C1 FF 43 E3 07 FD B9 0A 80 72 70 AF
------------------------------------------------------------------------
Remember, Luke, your source will be with you... always...


2002-06-27 14:28:23

by Steven Cole

[permalink] [raw]
Subject: Re: x86 Page Sizes

On Thu, 2002-06-27 at 00:35, Peter Svensson wrote:
> On 26 Jun 2002, Robert Love wrote:
>
> > Kernel has 4K pages in user and kernel space. It is the same address
> > space and segment, just uses MMU protection.
> >
> > x86 does 4K pages.
>
> The x86 cpus can use 4K or 4M pages in the hardware. The 4M pages are
> restricted to the kernel in Linux due to various problems. This has been
> discussed on this list a while ago. The thread was called "Have the 2.4
> kernel memory management problems on large machines been fixed?" the last
> time around.
>
> 4M pages are useful to minimize tlb misses which can be costly for some
> algorithms.
>
> Peter

In addition to that thread, you might want to read the paper "Multiple
Page Size Support in the Linux Kernel", pages 573-593 in the Proceedings
of the Ottawa Linux Symposium which you can download from here:

http://www.linuxsymposium.org/2002/

If you're on a slow connection, be forewarned that it is a 631 page pdf,
but thankfully it's compressed.

Steven


2002-06-27 15:45:44

by Robert Love

[permalink] [raw]
Subject: Re: x86 Page Sizes

On Thu, 2002-06-27 at 10:26, Steven Cole wrote:

> In addition to that thread, you might want to read the paper "Multiple
> Page Size Support in the Linux Kernel", pages 573-593 in the Proceedings
> of the Ottawa Linux Symposium which you can download from here:

Maybe I'll just go to the talk :)

Robert Love


2002-07-06 00:30:59

by john slee

[permalink] [raw]
Subject: Re: x86 Page Sizes

On Thu, Jun 27, 2002 at 08:35:05AM +0200, Peter Svensson wrote:
> The x86 cpus can use 4K or 4M pages in the hardware. The 4M pages are

DDJ ran an article quite a few years on this very topic. i'm sure they
also mentioned that some processors (ppro/p2 onwards?) are capable of
2MiB pages

j.

--
toyota power: http://indigoid.net/

2002-07-06 06:21:09

by William Lee Irwin III

[permalink] [raw]
Subject: Re: x86 Page Sizes

On Thu, Jun 27, 2002 at 08:35:05AM +0200, Peter Svensson wrote:
>> The x86 cpus can use 4K or 4M pages in the hardware. The 4M pages are

On Sat, Jul 06, 2002 at 10:36:17AM +1000, john slee wrote:
> DDJ ran an article quite a few years on this very topic. i'm sure they
> also mentioned that some processors (ppro/p2 onwards?) are capable of
> 2MiB pages

This has been rehashed too many times. There is a nice table in Intel's
processor manuals (the 3rd volumes on System Programming) describing
which combinations of options give which page sizes.


Cheers,
Bill