From 81834e5c4295e53a2ca3322f3acfbd1437e0993e Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sat, 16 Feb 2008 20:20:54 -0800 Subject: [PATCH] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 This allows fallback for order 1 stack allocations. In the fallback scenario the stacks will be virtually mapped. Signed-off-by: Christoph Lameter --- include/asm-ia64/thread_info.h | 6 ++++-- include/asm-x86/thread_info_32.h | 4 ++-- include/asm-x86/thread_info_64.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) Index: linux-2.6.25-rc3-mm1/include/asm-ia64/thread_info.h =================================================================== --- linux-2.6.25-rc3-mm1.orig/include/asm-ia64/thread_info.h 2008-03-04 16:59:33.352753594 -0800 +++ linux-2.6.25-rc3-mm1/include/asm-ia64/thread_info.h 2008-03-04 16:59:37.236597616 -0800 @@ -82,8 +82,10 @@ struct thread_info { #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR -#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) -#define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) +#define alloc_task_struct() ((struct task_struct *)__get_free_pages( \ + GFP_VFALLBACK, KERNEL_STACK_SIZE_ORDER)) +#define free_task_struct(tsk) free_pages((unsigned long) (tsk), \ + KERNEL_STACK_SIZE_ORDER) #define tsk_set_notify_resume(tsk) \ set_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME) Index: linux-2.6.25-rc3-mm1/include/asm-x86/thread_info_32.h =================================================================== --- linux-2.6.25-rc3-mm1.orig/include/asm-x86/thread_info_32.h 2008-03-04 16:59:33.360753241 -0800 +++ linux-2.6.25-rc3-mm1/include/asm-x86/thread_info_32.h 2008-03-04 16:59:37.236597616 -0800 @@ -96,10 +96,10 @@ static inline struct thread_info *curren /* thread information allocation */ #ifdef CONFIG_DEBUG_STACK_USAGE #define alloc_thread_info(tsk) ((struct thread_info *) \ - __get_free_pages(GFP_KERNEL| __GFP_ZERO, get_order(THREAD_SIZE))) + __get_free_pages(GFP_VFALLBACK| __GFP_ZERO, get_order(THREAD_SIZE))) #else #define alloc_thread_info(tsk) ((struct thread_info *) \ - __get_free_pages(GFP_KERNEL, get_order(THREAD_SIZE))) + __get_free_pages(GFP_VFALLBACK, get_order(THREAD_SIZE))) #endif #define free_thread_info(info) free_pages((unsigned long)(info), get_order(THREAD_SIZE)) Index: linux-2.6.25-rc3-mm1/include/asm-x86/thread_info_64.h =================================================================== --- linux-2.6.25-rc3-mm1.orig/include/asm-x86/thread_info_64.h 2008-03-04 16:59:33.372752735 -0800 +++ linux-2.6.25-rc3-mm1/include/asm-x86/thread_info_64.h 2008-03-04 16:59:37.236597616 -0800 @@ -77,9 +77,9 @@ static inline struct thread_info *stack_ /* thread information allocation */ #ifdef CONFIG_DEBUG_STACK_USAGE -#define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO) +#define THREAD_FLAGS (GFP_VFALLBACK | __GFP_ZERO) #else -#define THREAD_FLAGS GFP_KERNEL +#define THREAD_FLAGS GFP_VFALLBACK #endif #define alloc_thread_info(tsk) \