Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751045AbWCAIQY (ORCPT ); Wed, 1 Mar 2006 03:16:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751115AbWCAIQY (ORCPT ); Wed, 1 Mar 2006 03:16:24 -0500 Received: from omx2-ext.sgi.com ([192.48.171.19]:57507 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S1751045AbWCAIQY (ORCPT ); Wed, 1 Mar 2006 03:16:24 -0500 Date: Wed, 1 Mar 2006 00:16:12 -0800 From: Jeremy Higdon To: Jes Sorensen Cc: Roland Dreier , "Bryan O'Sullivan" , Andrew Morton , Andi Kleen , linux-kernel , Jesse Barnes Subject: Re: [PATCH] Define wc_wmb, a write barrier for PCI write combining Message-ID: <20060301081612.GA289233@sgi.com> References: <1140841250.2587.33.camel@localhost.localdomain> <44047565.3090202@sgi.com> <44048660.3010701@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44048660.3010701@sgi.com> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1705 Lines: 35 On Tue, Feb 28, 2006 at 06:20:32PM +0100, Jes Sorensen wrote: > Roland Dreier wrote: > > Jes> Not quite correct as far as I understand it. mmiowb() is > > Jes> supposed to guarantee that writes to MMIO space have > > Jes> completed before continuing. That of course covers the > > Jes> multi-CPU case, but it should also cover the write-combining > > Jes> case. > > > >I don't believe this is correct. mmiowb() does not guarantee that > >writes have completed -- they may still be pending in a buffer in a > >bridge somewhere. The _only_ effect of mmiowb() is to make sure that > >writes which have been ordered between CPUs using some other mechanism > >(i.e. a lock) are properly ordered by the rest of the system. This > >only has an effect systems like very large ia64 systems, where (as I > >understand it), writes can pass each other on the way to the PCI bus. > >In fact, mmiowb() is a NOP on essentially every architecture. > > Hmmmm > > That could be, seems like Jesse agrees that it could all be in the > pipeline somewhere. Considering Jesse was responsible for mmiowb() I'll > take his word for it ;-) Right. On the Altix, the mmiowb ensures that the write is into a FIFO on the destination node (node I/O device is attached to), so that later writes from other nodes will be ordered after it. But it doesn't actually force it to the bus. That's one reason why it's so much quicker than a using a read for ordering. jeremy - 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/