[PATCH 1/5 V2] Align stack boundaries based on personality

2008-07-28 Thread Eric Munson
This patch adds a personality flag that requests hugetlb pages be used for a processes stack. It adds a helper function that chooses the proper ALIGN macro based on tthe process personality and calls this function from setup_arg_pages when aligning the stack address. Signed-off-by: Andy

Re: [PATCH 1/5 V2] Align stack boundaries based on personality

2008-07-28 Thread Dave Hansen
On Mon, 2008-07-28 at 12:17 -0700, Eric Munson wrote: +static unsigned long personality_page_align(unsigned long addr) +{ + if (current-personality HUGETLB_STACK) +#ifdef CONFIG_STACK_GROWSUP + return HPAGE_ALIGN(addr); +#else + return addr HPAGE_MASK;