Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d1acce4 authored by Rik van Riel's avatar Rik van Riel Committed by Mel Gorman
Browse files

mm: Only flush the TLB when clearing an accessible pte



If ptep_clear_flush() is called to clear a page table entry that is
accessible anyway by the CPU, eg. a _PAGE_PROTNONE page table entry,
there is no need to flush the TLB on remote CPUs.

Signed-off-by: default avatarRik van Riel <riel@redhat.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-vm3rkzevahelwhejx5uwm8ex@git.kernel.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 2c3cf556
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address,
{
	pte_t pte;
	pte = ptep_get_and_clear((vma)->vm_mm, address, ptep);
	if (pte_accessible(pte))
		flush_tlb_page(vma, address);
	return pte;
}