提交 c42f4f4c 编写于 作者: M Mike Travis 提交者: Ingo Molnar

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.
Signed-off-by: NMike Travis <travis@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 cb6d2be6
......@@ -62,12 +62,12 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册