From: Chris Snook <csnook@redhat.com>
To: James Georgas <jgeorgas@rogers.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: HIMEM calculation
Date: Tue, 04 Sep 2007 08:48:35 -0400 [thread overview]
Message-ID: <46DD5423.2040707@redhat.com> (raw)
In-Reply-To: <491631.7157.qm@web88107.mail.re2.yahoo.com>
James Georgas wrote:
> > That's the vmalloc address space. You only get 896 MB in the NORMAL
> > zone on i386, to leave room for vmalloc. If you don't like it, go
> 64-bit.
> >
> > -- Chris
>
> I like it fine. I just didn't understand it. Thanks for answering.
>
> So, basically, the vmalloc address space is not backed by physical RAM,
> right? Rather, the virtual address space associated with vmalloc is
> mapped to physical pages by page tables?
Basically, yes, but that's an oversimplification. We actually use page tables
everywhere, but the conversion is simply +/- 0xC0000000 for the NORMAL zone, so
we can skip most of the fancy VM work and just use a trivial macro. vmalloc can
allocate large chunks of virtually contiguous memory even when the physical
memory is heavily fragmented, and since we've set aside address space for it,
it's visible in all process contexts.
vmalloc is handy sometimes because it can complete even if there's no memory
free when it's called, since the VM will swap out user pages and then return
those remapped into the vmalloc address space. Unfortunately, we can't use
vmalloc anywhere we want to use DMA because it will be accessed without the MMU.
Worse, we also can't use it in any path that could be called while trying to
free memory, due to recursion issues, which substantially limits its utility in
the kernel. Some people *cough*OpenAFS*cough* use it carelessly and get all
kinds of exciting panics under rare and difficult-to-reproduce load conditions.
-- Chris
next parent reply other threads:[~2007-09-04 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <491631.7157.qm@web88107.mail.re2.yahoo.com>
2007-09-04 12:48 ` Chris Snook [this message]
2007-09-03 22:19 HIMEM calculation James C. Georgas
2007-09-03 23:40 ` Chris Snook
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=46DD5423.2040707@redhat.com \
--to=csnook@redhat.com \
--cc=jgeorgas@rogers.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.