Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651011

[PATCH v3 4/8] x86/mm: Use new merged flush logic in arch_tlbbatch_flush()

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v3 4/8] x86/mm: Use new merged flush logic in arch_tlbbatch_flush()
Date 2017-05-26 02:50 +0200
Message-ID <tLbC2-79q-29@gated-at.bofh.it> (permalink)
References <tLbC1-79q-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Now there's only one copy of the local tlb flush logic for
non-kernel pages on SMP kernels.

The only functional change is that arch_tlbbatch_flush() will now
leave_mm() on the local CPU if that CPU is in the batch and is in
TLBSTATE_LAZY mode.

Cc: Rik van Riel <riel@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 arch/x86/mm/tlb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 12b8812e8926..c03b4a0ce58c 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -382,12 +382,8 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
 
 	int cpu = get_cpu();
 
-	if (cpumask_test_cpu(cpu, &batch->cpumask)) {
-		count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ALL);
-		local_flush_tlb();
-		trace_tlb_flush(TLB_LOCAL_SHOOTDOWN, TLB_FLUSH_ALL);
-	}
-
+	if (cpumask_test_cpu(cpu, &batch->cpumask))
+		flush_tlb_func_local(&info, TLB_LOCAL_SHOOTDOWN);
 	if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids)
 		flush_tlb_others(&batch->cpumask, &info);
 	cpumask_clear(&batch->cpumask);
-- 
2.9.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/8] x86 TLB flush cleanups, moving toward PCID support Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200
  [PATCH v3 6/8] x86/mm: Rework lazy TLB to track the actual loaded mm Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200
  [PATCH v3 2/8] x86/mm: Change the leave_mm() condition for local TLB flushes Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200
    Re: [PATCH v3 2/8] x86/mm: Change the leave_mm() condition for  local TLB flushes Rik van Riel <riel@redhat.com> - 2017-05-26 03:40 +0200
      Re: [PATCH v3 2/8] x86/mm: Change the leave_mm() condition for local  TLB flushes Andy Lutomirski <luto@kernel.org> - 2017-05-26 04:10 +0200
        Re: [PATCH v3 2/8] x86/mm: Change the leave_mm() condition for  local TLB flushes Rik van Riel <riel@redhat.com> - 2017-05-26 15:30 +0200
    Re: [PATCH v3 2/8] x86/mm: Change the leave_mm() condition for local  TLB flushes Nadav Amit <nadav.amit@gmail.com> - 2017-05-26 03:50 +0200
  [PATCH v3 5/8] x86/mm: Remove the UP tlbflush code; always use the formerly SMP code Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200
  [PATCH v3 1/8] x86/mm: Pass flush_tlb_info to flush_tlb_others() etc Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200
  [PATCH v3 4/8] x86/mm: Use new merged flush logic in arch_tlbbatch_flush() Andy Lutomirski <luto@kernel.org> - 2017-05-26 02:50 +0200

csiph-web