Thread (11 messages) 11 messages, 5 authors, 2008-09-22

Re: ioremap and vmalloc

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-09-22 05:29:12

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help