From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id 5D2E18D003C for ; Mon, 7 Mar 2011 12:48:57 -0500 (EST) Message-Id: <20110307172206.557810970@chello.nl> Date: Mon, 07 Mar 2011 18:13:51 +0100 From: Peter Zijlstra Subject: [RFC][PATCH 01/15] mm, powerpc: Dont use tlb_flush for external tlb flushes References: <20110307171350.989666626@chello.nl> Content-Disposition: inline; filename=powerpc64-tlb_flush.patch Sender: owner-linux-mm@kvack.org List-ID: To: Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , Russell King , Chris Metcalf , Martin Schwidefsky Both sparc64 and powerpc64 use tlb_flush() to flush their respective hash-tables which is entirely different from what flush_tlb_range()/flush_tlb_mm() would do. Powerpc64 already uses arch_*_lazy_mmu_mode() to batch and flush these so any tlb_flush() caller should already find an empty batch. So remove this functionality from tlb_flush(). Cc: Benjamin Herrenschmidt Signed-off-by: Peter Zijlstra --- arch/powerpc/mm/tlb_hash64.c | 10 ---------- arch/sparc/include/asm/tlb_64.h | 2 +- arch/sparc/include/asm/tlbflush_64.h | 13 +++++++++++++ 3 files changed, 14 insertions(+), 11 deletions(-) Index: linux-2.6/arch/powerpc/mm/tlb_hash64.c =================================================================== --- linux-2.6.orig/arch/powerpc/mm/tlb_hash64.c +++ linux-2.6/arch/powerpc/mm/tlb_hash64.c @@ -155,16 +155,6 @@ void __flush_tlb_pending(struct ppc64_tl void tlb_flush(struct mmu_gather *tlb) { - struct ppc64_tlb_batch *tlbbatch = &get_cpu_var(ppc64_tlb_batch); - - /* If there's a TLB batch pending, then we must flush it because the - * pages are going to be freed and we really don't want to have a CPU - * access a freed page because it has a stale TLB - */ - if (tlbbatch->index) - __flush_tlb_pending(tlbbatch); - - put_cpu_var(ppc64_tlb_batch); } /** -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org