diff options
author | Tejun Heo <tj@kernel.org> | 2009-08-03 07:12:19 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-08-03 18:29:34 +0200 |
commit | bdf977b37418cdf8a2252504779a7e12a09b7575 (patch) | |
tree | 0f3896a5b39c35f3018d3cb16f797ae7d6c4a66b /arch/x86/kernel/process_32.c | |
parent | x86, percpu: Fix DECLARE/DEFINE_PER_CPU_PAGE_ALIGNED() (diff) | |
download | linux-bdf977b37418cdf8a2252504779a7e12a09b7575.tar.xz linux-bdf977b37418cdf8a2252504779a7e12a09b7575.zip |
x86, percpu: Collect hot percpu variables into one cacheline
On x86_64, percpu variables current_task and kernel_stack are used for
get_current() and current_thread_info() respectively and thus are
often used close to each other. Move definition of current_task to
kernel/cpu/common.c right above kernel_stack definition and align it
to cacheline so that they always fall into the same cacheline. Two
percpu variables defined there together - irq_stack_ptr and irq_count
- are also pretty hot and will benefit from sharing the cacheline.
For consistency, current_task definition for x86_32 is also moved to
kernel/cpu/common.c.
Putting current_task and kernel_stack into the same cacheline was
suggested by Linus Torvalds.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 59f4524984af..daa4107be3b4 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -61,9 +61,6 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); -DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task; -EXPORT_PER_CPU_SYMBOL(current_task); - /* * Return saved PC of a blocked thread. */ |