Messages in this thread Patch in this message | | | Date | Tue, 15 Jul 2008 14:14:32 -0700 | From | Mike Travis <> | Subject | [PATCH 3/8] cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c |
| |
* Optimize various places where a pointer to the cpumask_of_cpu value will result in reducing stack pressure.
Based on linux-2.6.tip/master at the following commit:
commit 0a91813e16ebd5c2d9b5c2acd5b7c91742112c4f Merge: 9a635fa... 724dce0... Author: Ingo Molnar <mingo@elte.hu> Date: Tue Jul 15 14:55:17 2008 +0200
Signed-off-by: Mike Travis <travis@sgi.com> --- arch/x86/kernel/ldt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.tip.orig/arch/x86/kernel/ldt.c +++ linux-2.6.tip/arch/x86/kernel/ldt.c @@ -62,12 +62,12 @@ static int alloc_ldt(mm_context_t *pc, i if (reload) { #ifdef CONFIG_SMP - cpumask_t mask; + cpumask_of_cpu_ptr_declare(mask); preempt_disable(); load_LDT(pc); - mask = cpumask_of_cpu(smp_processor_id()); - if (!cpus_equal(current->mm->cpu_vm_mask, mask)) + cpumask_of_cpu_ptr_next(mask, smp_processor_id()); + if (!cpus_equal(current->mm->cpu_vm_mask, *mask)) smp_call_function(flush_ldt, current->mm, 1); preempt_enable(); #else --
| |