From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121AbdHANPX (ORCPT ); Tue, 1 Aug 2017 09:15:23 -0400 Received: from gate.crashing.org ([63.228.1.57]:40621 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbdHANOh (ORCPT ); Tue, 1 Aug 2017 09:14:37 -0400 Message-ID: <1501588965.2792.121.camel@kernel.crashing.org> Subject: Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() From: Benjamin Herrenschmidt To: Will Deacon , Peter Zijlstra Cc: torvalds@linux-foundation.org, oleg@redhat.com, paulmck@linux.vnet.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, stern@rowland.harvard.edu, Mel Gorman , Rik van Riel Date: Tue, 01 Aug 2017 22:02:45 +1000 In-Reply-To: <20170801103157.GD8702@arm.com> References: <20170607161501.819948352@infradead.org> <20170607162013.705678923@infradead.org> <20170609144553.GN13955@arm.com> <20170728174533.kbxu7uppdmle6t6d@hirez.programming.kicks-ass.net> <20170801103157.GD8702@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.4 (3.24.4-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-08-01 at 11:31 +0100, Will Deacon wrote: > Looks like that's what's currently relied upon: > > /* Clearing is done after a TLB flush, which also provides a barrier. */ > > It also provides barrier semantics on arm/arm64. In reality, I suspect > all archs have to provide some order between set_pte_at and flush_tlb_range > which is sufficient to hold up clearing the flag. :/ Hrm... not explicitely. Most archs (powerpc among them) have set_pte_at be just a dumb store, so the only barrier it has is the surrounding PTL. Now flush_tlb_range() I assume has some internal strong barriers but none of that is well defined or documented at all, so I suspect all bets are off. Ben.