From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 06/17] arm: mmu_gather rework Date: Thu, 24 Feb 2011 17:34:13 +0100 Message-ID: <1298565253.2428.288.camel@twins> References: <20110217162327.434629380@chello.nl> <20110217163235.106239192@chello.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20110217163235.106239192@chello.nl> Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli Cc: Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Paul McKenney , Yanmin Zhang , Russell King , "Luck,Tony" , PaulMundt List-Id: linux-arch.vger.kernel.org On Thu, 2011-02-17 at 17:23 +0100, Peter Zijlstra wrote: > plain text document attachment > (peter_zijlstra-arm-preemptible_mmu_gather.patch) > Fix up the arm mmu_gather code to conform to the new API. So akpm noted that this one doesn't apply anymore because of: commit 06824ba824b3e9f2fedb38bee79af0643198ed7f Author: Russell King Date: Sun Feb 20 12:16:45 2011 +0000 ARM: tlb: delay page freeing for SMP and ARMv7 CPUs =20 We need to delay freeing any mapped page on SMP and ARMv7 systems to ensure that the data is not accessed by other CPUs, or is used for speculative prefetch with ARMv7. This includes not only mapped pages but also pages used for the page tables themselves. =20 This avoids races with the MMU/other CPUs accessing pages after they've been freed but before we've invalidated the TLB. =20 Signed-off-by: Russell King Which raises a nice point about shift_arg_pages() which calls free_pgd_range(), the other architectures that look similar to arm in this respect are ia64 and sh, do they suffer the same problem? It doesn't look hard to fold the requirements for this into the generic tlb range support (patch 14 in this series). -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([18.85.46.34]:42605 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756332Ab1BXQfA convert rfc822-to-8bit (ORCPT ); Thu, 24 Feb 2011 11:35:00 -0500 Subject: Re: [PATCH 06/17] arm: mmu_gather rework From: Peter Zijlstra In-Reply-To: <20110217163235.106239192@chello.nl> References: <20110217162327.434629380@chello.nl> <20110217163235.106239192@chello.nl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 24 Feb 2011 17:34:13 +0100 Message-ID: <1298565253.2428.288.camel@twins> Mime-Version: 1.0 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrea Arcangeli Cc: Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Paul McKenney , Yanmin Zhang , Russell King , "Luck,Tony" , PaulMundt Message-ID: <20110224163413.jlPw5MBp-TW2hW0mir6Ta0ma3UnK7l6gbTCHZaPtHQE@z> On Thu, 2011-02-17 at 17:23 +0100, Peter Zijlstra wrote: > plain text document attachment > (peter_zijlstra-arm-preemptible_mmu_gather.patch) > Fix up the arm mmu_gather code to conform to the new API. So akpm noted that this one doesn't apply anymore because of: commit 06824ba824b3e9f2fedb38bee79af0643198ed7f Author: Russell King Date: Sun Feb 20 12:16:45 2011 +0000 ARM: tlb: delay page freeing for SMP and ARMv7 CPUs We need to delay freeing any mapped page on SMP and ARMv7 systems to ensure that the data is not accessed by other CPUs, or is used for speculative prefetch with ARMv7. This includes not only mapped pages but also pages used for the page tables themselves. This avoids races with the MMU/other CPUs accessing pages after they've been freed but before we've invalidated the TLB. Signed-off-by: Russell King Which raises a nice point about shift_arg_pages() which calls free_pgd_range(), the other architectures that look similar to arm in this respect are ia64 and sh, do they suffer the same problem? It doesn't look hard to fold the requirements for this into the generic tlb range support (patch 14 in this series).