Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934404Ab2JYNI3 (ORCPT ); Thu, 25 Oct 2012 09:08:29 -0400 Received: from casper.infradead.org ([85.118.1.10]:51350 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933014Ab2JYNI2 (ORCPT ); Thu, 25 Oct 2012 09:08:28 -0400 Message-Id: <20121025124832.914777732@chello.nl> User-Agent: quilt/0.48-1 Date: Thu, 25 Oct 2012 14:16:23 +0200 From: Peter Zijlstra To: Rik van Riel , Andrea Arcangeli , Mel Gorman , Johannes Weiner , Thomas Gleixner , Linus Torvalds , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Ingo Molnar Subject: [PATCH 06/31] mm: Only flush the TLB when clearing an accessible pte References: <20121025121617.617683848@chello.nl> Content-Disposition: inline; filename=0006-mm-Only-flush-the-TLB-when-clearing-an-accessible-pt.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1215 Lines: 36 From: Rik van Riel 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 Signed-off-by: Peter Zijlstra Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Ingo Molnar --- mm/pgtable-generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: tip/mm/pgtable-generic.c =================================================================== --- tip.orig/mm/pgtable-generic.c +++ tip/mm/pgtable-generic.c @@ -88,7 +88,8 @@ pte_t ptep_clear_flush(struct vm_area_st { 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/