Commit-ID: 6fe64360a759f3cbbff4835da4c226d6cb78c34d Gitweb: http://git.kernel.org/tip/6fe64360a759f3cbbff4835da4c226d6cb78c34d Author: Rik van Riel <[email protected]> AuthorDate: Tue, 9 Oct 2012 15:31:59 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 28 Oct 2012 17:30:56 +0100
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: Rik van Riel <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Ingo Molnar <[email protected]> --- mm/pgtable-generic.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c index d8397da..0c8323f 100644 --- a/mm/pgtable-generic.c +++ b/mm/pgtable-generic.c @@ -88,7 +88,8 @@ 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); - flush_tlb_page(vma, address); + if (pte_accessible(pte)) + flush_tlb_page(vma, address); return pte; } #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

