Re: Allocating more than 890MB in the kernel?

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Oct 19 2001 - 15:32:36 EST


Timur Tabi wrote:

>
> That's completely missing the point of my request (which, I admit, I
> didn't make clear). I need to allocate about 3/4 of available memory in
> the kernel. If I had 2GB of RAM, I'd need to allocate 1.5GB. If I had
> 8 GB of RAM, I'd need to allocate 6GB. I just used 3GB/4GB because it's
> our current test platform.
>

There is no way you can allocate 6 GB of address space when you have 4 GB
to dole out -- and that includes to userspace. Linux tends to allocate
most of the address space (usually 3 GB) to userspace, because it can be
re-used between processes and it matches the needs of more users.

This puts fundamental limits on how much space is addressible in the
kernel. What you can do if your application permits is allocate HIGHMEM
pages, and use kmap()/kmap_atomic()/kunmap() to selectively bring them
into the address space on an as-need basis. THIS IS EXPENSIVE, have no
illusions about it, and doesn't give you space that is contiguous in
either linear nor physical space.

Obviously, on a 64-bit CPU these limitations utterly vanish, since address
space is no longer limited.

        -hpa

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



This archive was generated by hypermail 2b29 : Tue Oct 23 2001 - 21:00:24 EST