]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Dimitri Sivanich <sivanich@sgi.com> |
2 | Date: Wed, 15 Apr 2009 15:56:25 +0000 (-0500) | |
3 | Subject: ia64: smp_flush_tlb_mm() should only send IPI's to cpus in cpu_vm_mask | |
4 | Patch-mainline: 2.6.30-rc3 | |
5 | Git-commit: edb91dc01a216e84b78721b71a06db1e0db141b7 | |
6 | References: bnc#497807 | |
7 | ||
8 | [IA64] smp_flush_tlb_mm() should only send IPI's to cpus in cpu_vm_mask | |
9 | ||
10 | Having flush_tlb_mm->smp_flush_tlb_mm() send an IPI to every cpu | |
11 | on the system is occasionally triggering spin_lock contention in | |
12 | generic_smp_call_function_interrupt(). | |
13 | ||
14 | Follow x86 arch's lead and only sends IPIs to the cpus in mm->cpu_vm_mask. | |
15 | ||
16 | Experiments with this change have shown significant improvement in this | |
17 | contention issue. | |
18 | ||
19 | Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> | |
20 | Signed-off-by: Tony Luck <tony.luck@intel.com> | |
21 | Acked-by: Jeff Mahoney <jeffm@suse.com> | |
22 | --- | |
23 | ||
24 | arch/ia64/kernel/smp.c | 13 +++++-------- | |
25 | 1 file changed, 5 insertions(+), 8 deletions(-) | |
26 | ||
27 | --- a/arch/ia64/kernel/smp.c | |
28 | +++ b/arch/ia64/kernel/smp.c | |
29 | @@ -300,15 +300,12 @@ smp_flush_tlb_mm (struct mm_struct *mm) | |
30 | return; | |
31 | } | |
32 | ||
33 | + smp_call_function_mask(mm->cpu_vm_mask, | |
34 | + (void (*)(void *))local_finish_flush_tlb_mm, mm, 1); | |
35 | + local_irq_disable(); | |
36 | + local_finish_flush_tlb_mm(mm); | |
37 | + local_irq_enable(); | |
38 | preempt_enable(); | |
39 | - /* | |
40 | - * We could optimize this further by using mm->cpu_vm_mask to track which CPUs | |
41 | - * have been running in the address space. It's not clear that this is worth the | |
42 | - * trouble though: to avoid races, we have to raise the IPI on the target CPU | |
43 | - * anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is | |
44 | - * rather trivial. | |
45 | - */ | |
46 | - on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1); | |
47 | } | |
48 | ||
49 | void arch_send_call_function_single_ipi(int cpu) |