Re: Linux and lots of memory: documentation?

Khimenko Victor (khim@sch57.msk.ru)
Thu, 17 Dec 1998 21:56:39 +0300 (MSK)


17-Dec-98 11:56 you wrote:
> Howdy,

> I'm trying to track down information regard how Linux handles memory. I've
> got a 4GB system, and the stock 2.1.131 kernel only uses about 970M of that
> memory. I'd like Linux to be able to access as much of that physical memory
> as possible.

> I've been able to find very little information regarding this topic, other
> than the comments in include/asm-i386/page.h. I was hoping you could point
> me towards a resource that might answer the following questions:

> (1) How is __PAGE_OFFSET actually used? The page.h comments aren't clear on
> this. They suggest *how* to change the value, but not *why*.

Address space in Linux is splited: one part is for access to real memory, I/O,
etc (plus some buffers -- thus by default only 960Mb, not 1Gb is supported).
You could riase barier and thus more real memory will be allowed but this will
lower amount of memory addresable per process (default: 1G-64Mb RAM, 3Gb
addressable per proccess; if you'll raise __PAGE_OFFSET you'll got 2G-64Mb RAM
and 2Gb addressable per process or 3G RAM and 1G-64Mb addressable per process
or ... you got the idea :-)

> (2) Is it possible, under Linux, to access 4GB of physical of memory? Or
> is some of that address space always required for memory mapped
> i/o?

64Mb is borrowed for internal kernel needs but by far more important is
shrikage of process addresable memory. If you really need 4Gb RAM just use
64bit processor :-)) You could use 4Gb-128Mb but then each process will be
able to use only few Mbs !

> (3) Is it possible to make this process more modular? That is, is there
> any way to make Linux happily support whatever memory happens to
> be available?

Not for 2.2. __PAGE_OFFSET is used in many places in kernel and thus should be
constant, not variable... Self-modifying code could help but it's to late to
add such changes for 2.2...

-
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/