Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754971AbYFEIow (ORCPT ); Thu, 5 Jun 2008 04:44:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752875AbYFEIom (ORCPT ); Thu, 5 Jun 2008 04:44:42 -0400 Received: from gate.crashing.org ([63.228.1.57]:37702 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbYFEIol (ORCPT ); Thu, 5 Jun 2008 04:44:41 -0400 Subject: Re: MMIO and gcc re-ordering issue From: Benjamin Herrenschmidt Reply-To: benh@kernel.crashing.org To: Jes Sorensen Cc: Jesse Barnes , Nick Piggin , Jeremy Higdon , Roland Dreier , Arjan van de Ven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tpiepho@freescale.com, linuxppc-dev@ozlabs.org, scottwood@freescale.com, torvalds@linux-foundation.org, David Miller , alan@lxorguk.ukuu.org.uk In-Reply-To: <4847A690.302@sgi.com> References: <1211852026.3286.36.camel@pasglop> <4843C3D7.7000609@sgi.com> <200806031433.12460.nickpiggin@yahoo.com.au> <200806030952.10360.jbarnes@virtuousgeek.org> <4847A690.302@sgi.com> Content-Type: text/plain Date: Thu, 05 Jun 2008 18:43:53 +1000 Message-Id: <1212655433.9496.109.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1039 Lines: 26 On Thu, 2008-06-05 at 10:40 +0200, Jes Sorensen wrote: > Jesse Barnes wrote: > > Now, in hindsight, using a PIO write set & test flag approach in > > writeX/spin_unlock (ala powerpc) might have been a better approach, but iirc > > that never came up in the discussion, probably because we were focused on PCI > > posting and not uncached vs. cached ordering. > > Hi Jesse, > > I am going to take a stab at implementing this so we can see how much > of an impact it will have. Note that the powerpc implementation currently clears the flag on spin_lock and tests it on unlock. We are considering changing that to not touch the flag on spin_lock and just clear it whenever we do a sync (ie, on unlock, on explicit mmiowb, and possibly even on readl's where we happen to do sync's). Ben. -- 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/