Re: Relocating mem_map to the upper end of main memory?

Andrea Arcangeli (andrea@suse.de)
Fri, 8 Oct 1999 15:58:18 +0200 (CEST)


On Fri, 8 Oct 1999, Josef Moellers wrote:

>Question: Is there any reason why the mem_map must be at the lower end
>of memory or can I go ahead and relocate it to the upper end? The

The reason is that the current code is strightforward.

Before mmap exists you can't GFP at all so you'll have to add a trick to
reserve some page of memory to make sure to not add them to the freelist
leather (in mem_init()). Looks like that the only downside of moving
mem_map to the end is that you'll risk to lose half page of memory in
mean. I think we want to not lose all the DMA space so it worth to
relocate mem_map to the end. Agreed.

Relocating also all the other stuff (console and prof_buffer) would be
possible too but we should change the driver initializations internals to
grab memory from the end to the top instead of from the top to the end as
now. For the prof-buffer it's trivial as we could more simply/safely
allocate it after mem_init via GFP that will give us no-DMA pages unless
there are no free pages under the 16mbyte limit (for 2.3.19 I ported the
2.2.13pre14 page_alloc code that will preserve the DMA pages in O(1) as
bigmem was just doing w.r.t the regular pages, see this patch:

ftp://ftp.suse.com/pub/people/andrea/kernel-patches/2.3.18ac9/page_alloc-type-1

).

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/