From: "H. Peter Anvin" <hpa@zytor.com>
To: Timur Tabi <ttabi@interactivesi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Allocating more than 890MB in the kernel?
Date: Fri, 19 Oct 2001 13:32:36 -0700 [thread overview]
Message-ID: <3BD08DE4.2020500@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0110191204210.21846-100000@hill.cs.ucr.edu> <3BD08207.7090807@interactivesi.com> <9qq0mo$eun$1@cesium.transmeta.com> <3BD08B57.1070604@interactivesi.com>
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
next prev parent reply other threads:[~2001-10-19 20:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-19 18:48 Allocating more than 890MB in the kernel? Timur Tabi
2001-10-19 19:04 ` John Tyner
2001-10-19 19:41 ` Timur Tabi
2001-10-19 19:59 ` H. Peter Anvin
2001-10-19 20:21 ` Timur Tabi
2001-10-19 20:32 ` H. Peter Anvin [this message]
2001-10-20 4:40 ` Rob Landley
2001-10-20 18:09 ` H. Peter Anvin
2001-10-25 4:04 ` Albert D. Cahalan
2001-10-26 16:13 ` Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3BD08DE4.2020500@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ttabi@interactivesi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox