Large physical memory in 32 bit kernels

Frederick Staats (fstaats@ichips.intel.com)
Sun, 17 Jan 1999 12:46:26 -0800


Disclaimer: Opinions expressed in this email are entirely my
own and do not necessary express the views of my employer
Intel Corporation.

There have been several threads on the issues of large physical
memory machines in kernels that have been compiled for 32 bit
operation. People have made the point that Linux is limited
to ~1 GByte physical memory (and 3 GByte virtual memory) with the
default kernel. There are many reasons for these choices the
most pressing of which for most people is the need to avoid a
TLB flush on the x86 architecture when doing system calls. There
are similar issues with other processor architectures as well.

I suggest that there could be an alternative kernel memory
mapping strategy in "Large" memory machines. When you have
>1 GByte physical memory the active kernel modules and data
structures associated with running processes represent a very
small fraction of the total physical memory. The entire kernel
could be locked into physical memory at little cost to total
system performance or resources (8-16 Mbytes is only %1 of the
total system memory.) This is a VERY different situation than
you see in a "Small" memory machine where total physical memory
is only 8-16 Mbytes.

Not all large memory machines will be 64 bit architectures. In
the Linux community many of the large memory machines will be
in servers configurations where the most cost effective solution
will be 32 bit Symmetric Multi Processing processors in a large
(>1 GBytes) configuration. In these situations it makes sense
for Linux to provide individual processes access to large physical
memory blocks (as much of the 4 GByte address space provided by
a 32 bit pointer as possible.)

It is quite acceptable to take the TLB flush hit when switching
context from active to inactive user processes. Often this
switch involves paging the inactive process in from disk anyway.

I suggest that Linux community consider creating an alternative
large memory model for use on large memory machines with 32 bit
addressing. In this model the active parts of the kernel and
kernel data structures share the same 4 GByte address space as
the kernel and are locked into memory. The kernel only gets the
high memory it really needs and swaps in inactive process related
data structures when needed.

For people who really need "Huge" data models (>4 GBytes) there
would always use 64 bit machines running Linux in a native
64 bit addressing mode. There is room for a middle ground between
the "Small" memory machines where only a fraction of the
virtual 32 bit memory space is real memory and the "Huge" 64 bit
machines.

--
Frederick Staats
fstaats@ichips.intel.com
503-264-9022

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/