On Fri, 2008-05-02 at 10:15 -0700, Dave Hansen wrote: > On Thu, 2008-05-01 at 18:51 -0700, Eric B Munson wrote > > The GROWSUP and GROWSDOWN VM flags are turned off because a hugetlb backed > > vma is not resizable, so it will be appropriately sized when created. When > > a process exceeds stack size it recieves a segfault exactly as it would if it > > exceeded the ulimit. > > This one is *really* subtle. The segfault might behave like breaking a > ulimit. But, unlike a ulimit, you can't really work around this > particular limitation very easily. I must have not articulated the way things are working well enough. The vma that is created for the process stack is sized to hold ulimit / HPAGE_SIZE huge pages if ulimit is not unlimited. If ulimit is unlimited it holds 256MB / HPAGE_SIZE pages. 256MB was picked because it is a decent comprimise between large stacks and leaving some of a 32 bit address space available. The segfault is as easily solved as adjusting the ulimit for stack size. If ulimit is raised the stack vma will be bigger to match. So it does behave exactly as base page stacks would when you exceed the ulimit for stack size. > > This will really suck for anyone that tries to use 64k huge pages on > powerpc, right? Can you expand on this some, I am not sure what you are getting at. > > Are you actually looking to get this included, or are you just trying to > play with this? It is useful as a toy as-is, but I think you should > look at fixing stack growing before it gets merged anywhere. I am looking for comments and eventually to be merged. What would take to get something along this idea merged? Is anyone completely opposed, and if so why? > > -- Dave >