Now, ia64's hard-stack-size (rlimit.max) is sum of register-stack size and memory-stack size. But soft-stack-size (rlimit.cur) accounitng is not sum.. they are accounted independently. This is inconsistent. I hear some people says that "When I set stack-size-limit to 32M, I want to use 32M of memory stack..." and register-stack expansion can fail because stack is used up by memory-stack. This patch moves register-stack's base address to lower address. By this patch, meaning of hard-stack-size can be equal to soft-stack-size and we can avoid the case "register-backing store cannot be expanded because the memory stack uses the whole stack". How about this ? Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Index: linux-2.6.21-rc4/arch/ia64/mm/init.c =================================================================== --- linux-2.6.21-rc4.orig/arch/ia64/mm/init.c +++ linux-2.6.21-rc4/arch/ia64/mm/init.c @@ -152,7 +152,7 @@ inline void ia64_set_rbs_bot (void) { unsigned long stack_size = current->signal->rlim[RLIMIT_STACK].rlim_max & -16; - + stack_size *= 2; if (stack_size > MAX_USER_STACK_SIZE) stack_size = MAX_USER_STACK_SIZE; current->thread.rbs_bot = PAGE_ALIGN(current->mm->start_stack - stack_size); - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |