From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Sébastien Chrétien" <chretien@enseirb.fr>
Cc: linuxppc-dev@ozlabs.org, Kumar Gala <galak@gate.crashing.org>
Subject: Re: ioremap and vmalloc
Date: Mon, 22 Sep 2008 15:28:50 +1000 [thread overview]
Message-ID: <1222061330.12085.18.camel@pasglop> (raw)
In-Reply-To: <48D3D70D.3060404@enseirb.fr>
On Fri, 2008-09-19 at 18:45 +0200, Sébastien Chrétien wrote:
> if I write :
> ioremap(0x20000000,0x40000) and ioremap(0x20000000,0x50000)
>
> Will it crash ?
To give you a rough idea, unless you tweak things like TASK_SIZE,
KERNELBASE, CONFIG_LOWMEM_SIZE, etc... and depending on what CPU you
use, you can generally count on approx. 200M of virtual space for
vmalloc/ioremap, or a bit less. I would additionally recommend against
mapping a significant portion of that for your devices as the kernel
will need space for its own use by vmalloc.
You can increase the amount available here by lowering TASK_SIZE to 2G
and KERNELBASE as well, and keeping CONFIG_LOWMEM_SIZE clamped to
something like 256M. That will give you a good GB of virtual space if I
can still count correctly.
(Note, having just looked at the MMU init code for 32 bits, I almost had
to puke, Kumar, Josh, we really need to clean that shit up one of these
days).
Cheers,
Ben.
next prev parent reply other threads:[~2008-09-22 5:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 11:15 ioremap and vmalloc Sébastien Chrétien
2008-09-19 13:49 ` Grant Likely
2008-09-19 16:34 ` Sébastien Chrétien
2008-09-19 16:38 ` Josh Boyer
2008-09-19 16:45 ` Sébastien Chrétien
2008-09-19 16:58 ` Josh Boyer
2008-09-19 17:12 ` Grant Likely
2008-09-19 17:47 ` Sébastien Chrétien
2008-09-19 17:52 ` Sébastien Chrétien
2008-09-22 5:28 ` Benjamin Herrenschmidt [this message]
2008-09-19 16:43 ` Grant Likely
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=1222061330.12085.18.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=chretien@enseirb.fr \
--cc=galak@gate.crashing.org \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).