Commit 37c2c764 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] use kmalloc for ia32 stacks

From: William Lee Irwin III <wli@holomorphy.com>

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.
parent 4da99f75
......@@ -87,8 +87,8 @@ static inline struct thread_info *current_thread_info(void)
/* 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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment