]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/ia64-smp_flush_tlb_mm-IPI-fix
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / ia64-smp_flush_tlb_mm-IPI-fix
CommitLineData
2cb7cef9
BS
1From: Dimitri Sivanich <sivanich@sgi.com>
2Date: Wed, 15 Apr 2009 15:56:25 +0000 (-0500)
3Subject: ia64: smp_flush_tlb_mm() should only send IPI's to cpus in cpu_vm_mask
4Patch-mainline: 2.6.30-rc3
5Git-commit: edb91dc01a216e84b78721b71a06db1e0db141b7
6References: bnc#497807
7
8[IA64] smp_flush_tlb_mm() should only send IPI's to cpus in cpu_vm_mask
9
10Having flush_tlb_mm->smp_flush_tlb_mm() send an IPI to every cpu
11on the system is occasionally triggering spin_lock contention in
12generic_smp_call_function_interrupt().
13
14Follow x86 arch's lead and only sends IPIs to the cpus in mm->cpu_vm_mask.
15
16Experiments with this change have shown significant improvement in this
17contention issue.
18
19Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
20Signed-off-by: Tony Luck <tony.luck@intel.com>
21Acked-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)