From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdHAMO6 (ORCPT ); Tue, 1 Aug 2017 08:14:58 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:54105 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752114AbdHAMOa (ORCPT ); Tue, 1 Aug 2017 08:14:30 -0400 Date: Tue, 1 Aug 2017 14:14:19 +0200 From: Peter Zijlstra To: Benjamin Herrenschmidt Cc: Will Deacon , 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 Subject: Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending() Message-ID: <20170801121419.a365inyyk5hghb6w@hirez.programming.kicks-ass.net> References: <20170607161501.819948352@infradead.org> <20170607162013.705678923@infradead.org> <20170609144553.GN13955@arm.com> <20170728174533.kbxu7uppdmle6t6d@hirez.programming.kicks-ass.net> <20170801103157.GD8702@arm.com> <1501588965.2792.121.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1501588965.2792.121.camel@kernel.crashing.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 01, 2017 at 10:02:45PM +1000, Benjamin Herrenschmidt wrote: > 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. Right.. but seeing how we're in fact relying on things here it might be time to go figure this out and document bits. *sigh*, I suppose its going to be me doing this.. :-)