Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750753AbWCHPat (ORCPT ); Wed, 8 Mar 2006 10:30:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751270AbWCHPat (ORCPT ); Wed, 8 Mar 2006 10:30:49 -0500 Received: from smtp.osdl.org ([65.172.181.4]:58326 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750753AbWCHPas (ORCPT ); Wed, 8 Mar 2006 10:30:48 -0500 Date: Wed, 8 Mar 2006 07:30:19 -0800 (PST) From: Linus Torvalds To: Alan Cox cc: Paul Mackerras , David Howells , akpm@osdl.org, linux-arch@vger.kernel.org, bcrl@linux.intel.com, matthew@wil.cx, linux-kernel@vger.kernel.org, mingo@redhat.com, linuxppc64-dev@ozlabs.org, jblunck@suse.de Subject: Re: Memory barriers and spin_unlock safety In-Reply-To: <1141823577.7605.31.camel@localhost.localdomain> Message-ID: References: <32518.1141401780@warthog.cambridge.redhat.com> <17417.29375.87604.537434@cargo.ozlabs.ibm.com> <17422.19865.635112.820824@cargo.ozlabs.ibm.com> <1141823577.7605.31.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1378 Lines: 30 On Wed, 8 Mar 2006, Alan Cox wrote: > > On Maw, 2006-03-07 at 19:54 -0800, Linus Torvalds wrote: > > Close, yes. HOWEVER, it's only really ordered wrt the "innermost" bus. I > > don't think PCI bridges are supposed to post PIO writes, but a x86 CPU > > basically won't stall for them forever. > > The bridges I have will stall forever. You can observe this directly if > an IDE device decides to hang the IORDY line on the IDE cable or you > crash the GPU on an S3 card. Ok. The only thing I have tested is the timing of "outb()" on its own, which is definitely long enough that it clearly waits for _some_ bus activity (ie the CPU doesn't just post the write internally), but I don't know exactly what the rules are as far as the core itself is concerned: I suspect the core just waits until it has hit the northbridge or something. In contrast, a MMIO write to a WC region at least will not necessarily pause the core at all: it just hits the write queue in the core, and the core continues on (and may generate other writes that will be combined in the write buffers before the first one even hits the bus). Linus - 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/