Patch "x86/mm: Reduce indentation in flush_tlb_func()" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/mm: Reduce indentation in flush_tlb_func()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-mm-reduce-indentation-in-flush_tlb_func.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b3b90e5af7976e46541f5029a369c9c38c5e4ceaMon Sep 17 00:00:00 2001
From: Andy Lutomirski <[email protected]>
Date: Mon, 22 May 2017 15:30:02 -0700
Subject: x86/mm: Reduce indentation in flush_tlb_func()
From: Andy Lutomirski <[email protected]>
commit b3b90e5af7976e46541f5029a369c9c38c5e4cea upstream.
The leave_mm() case can just exit the function early so we don't need to indent the entire remainder of the function.
--- arch/x86/mm/tlb.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
arch/x86/mm/tlb.c +18 -16
@@ -237,24 +237,26 @@ static void flush_tlb_func(void *info)return ;count_vm_tlb_event (NR_TLB_REMOTE_FLUSH_RECEIVED ); -if (this_cpu_read (cpu_tlbstate.state) ==TLBSTATE_OK ) { -if (f->flush_end ==TLB_FLUSH_ALL ) { -local_flush_tlb (); -trace_tlb_flush (TLB_REMOTE_SHOOTDOWN ,TLB_FLUSH_ALL ); - }else { -unsigned long addr; -unsigned long nr_pages = - (f->flush_end - f->flush_start) /PAGE_SIZE ; - addr = f->flush_start; -while (addr < f->flush_end) { -__flush_tlb_single (addr); - addr +=PAGE_SIZE ; - } -trace_tlb_flush (TLB_REMOTE_SHOOTDOWN , nr_pages); - } - }else + +if (this_cpu_read (cpu_tlbstate.state) !=TLBSTATE_OK ) {leave_mm (smp_processor_id ()); +return ; + } +if (f->flush_end ==TLB_FLUSH_ALL ) { +local_flush_tlb (); +trace_tlb_flush (TLB_REMOTE_SHOOTDOWN ,TLB_FLUSH_ALL ); + }else { +unsigned long addr; +unsigned long nr_pages = + (f->flush_end - f->flush_start) /PAGE_SIZE ; + addr = f->flush_start; +while (addr < f->flush_end) { +__flush_tlb_single (addr); + addr +=PAGE_SIZE ; + } +trace_tlb_flush (TLB_REMOTE_SHOOTDOWN , nr_pages); + } } void native_flush_tlb_others(const struct cpumask *cpumask,
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/x86-mm-refactor-flush_tlb_mm_range-to-merge-local-and-remote-cases.patch queue-4.9/x86-mm-pass-flush_tlb_info-to-flush_tlb_others-etc.patch queue-4.9/x86-mm-rework-lazy-tlb-to-track-the-actual-loaded-mm.patch queue-4.9/x86-mm-kvm-teach-kvm-s-vmx-code-that-cr3-isn-t-a-constant.patch queue-4.9/x86-mm-use-new-merged-flush-logic-in-arch_tlbbatch_flush.patch queue-4.9/x86-kvm-vmx-simplify-segment_base.patch queue-4.9/x86-entry-unwind-create-stack-frames-for-saved-interrupt-registers.patch queue-4.9/x86-mm-reduce-indentation-in-flush_tlb_func.patch queue-4.9/x86-mm-remove-the-up-asm-tlbflush.h-code-always-use-the-formerly-smp-code.patch queue-4.9/x86-mm-reimplement-flush_tlb_page-using-flush_tlb_mm_range.patch queue-4.9/mm-x86-mm-make-the-batched-unmap-tlb-flush-api-more-generic.patch queue-4.9/x86-kvm-vmx-defer-tr-reload-after-vm-exit.patch queue-4.9/x86-mm-change-the-leave_mm-condition-for-local-tlb-flushes.patch queue-4.9/x86-mm-be-more-consistent-wrt-page_shift-vs-page_size-in-tlb-flush-code.patch