From: William Lee Irwin III I've been slab allocating the stack on i386 for some time, and it has gone without incident in pgcl, -wli, -mjb (?), and so on. kmalloc() is fine; there isn't any particularly compelling reason for a dedicated slab as there's no preconstruction to do, though it can be arranged. Basically, it works, there's no obvious reason not to, and (even better) it's not totally invisible to the VM and even makes overhead reportable. include/asm-i386/thread_info.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN include/asm-i386/thread_info.h~kmalloc-stacks include/asm-i386/thread_info.h --- 25/include/asm-i386/thread_info.h~kmalloc-stacks 2003-07-13 12:43:43.000000000 -0700 +++ 25-akpm/include/asm-i386/thread_info.h 2003-07-13 12:43:43.000000000 -0700 @@ -87,8 +87,8 @@ static inline struct thread_info *curren /* thread information allocation */ #define THREAD_SIZE (2*PAGE_SIZE) -#define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) -#define free_thread_info(ti) free_pages((unsigned long) (ti), 1) +#define alloc_thread_info(task) ((struct thread_info *)kmalloc(THREAD_SIZE, GFP_KERNEL)) +#define free_thread_info(info) kfree(info) #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) _