Re: [patch] flexible-mmap-2.6.7-D5

From: Ingo Molnar
Date: Sat Jun 19 2004 - 02:46:54 EST



* William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:

> > to a more flexible top-down mmap() method:
> >
> > 0x08000000 ... binary image
> > 0x08xxxxxx ... brk area, grows upwards
> > 0xbfxxxxxx ... _end_ of all mmaps, new mmaps go below old ones
> > 0xbfyyyyyy ... stack
>
> It may be useful to move STACK_TOP to 0x8040000 give the stack more
> head room and fit small statically-linked executables into one
> pagetable page. Otherwise the stack has very little headroom after the
> first mmap().

the patch already takes care of this via two mechanisms:

- the top of the mmaps is moved down by the expected maximum size of the
stack (the stack rlimit).

- we maintain a minimum 128 MB 'gap' between stack top and mmap top.

moving it to 0x08040000 is asking for trouble, there are people who need
1GB stacks (dont ask why). This approach has been in production use for
~2 years and it works fine for a wide range of applications and VM
needs.

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