vmalloc size
From: Dave Hylands <hidden>
Date: 2012-06-26 05:41:51
Hi Subbu, On Mon, Jun 25, 2012 at 7:45 PM, Subramaniam Appadodharana [off-list ref] wrote: ...snip...
quoted
However, if you call vmalloc and lets suppose that vmalloc just happens to return 0xE0000000. The physical address of the first page might be 0xD2345000. What's important is that the physical pages which back up the vmalloc area all come from the kernel direct mapped area. They won't ever be backed by pages from high-memory. So the physical addresses will all be in the range 0x40000000 thru 0x5FFFFFFF.This is the one that I had a completely wrong understanding of!!!!!!! I understand from the above statement that ?the vmalloc'ed virtual address will _ALWAYS_ ?correspond to a ?physical address from?the lowmem region! I was under the impression that the carved out region for the vmalloc, is the one that would back any vmalloc'ed virtual address, which is absolutely wrong by what you are saying.
Actually, I was the one that was wrong. vmalloc pages can come from low or highmem.
Now this also means that increasing vmalloc inadvertently reduces lowmem. Why is this designed such a way?
It may or may not depending on the amount of physical memory and the size of the vmalloc space. vmalloc space will normally increase vmalloc_end, which won't reduce lowmem. If the end can't advance any further, then I believe that the start can be reduced. This will reduce lowmem, if the lowmem overlaps with vmalloc memory.
Essentially, the idea that we increase vmalloc is because we expect more memory to be consumed via vmalloc calls, and hence we might need more physical address backing. But increasing vmalloc decreases low mem, which would also mean that we have less backing. Am I missing something here too :)?
No - that was my mistake. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com