Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932843AbXJPKeN (ORCPT ); Tue, 16 Oct 2007 06:34:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759105AbXJPKd4 (ORCPT ); Tue, 16 Oct 2007 06:33:56 -0400 Received: from artax.karlin.mff.cuni.cz ([195.113.31.125]:39865 "EHLO artax.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759018AbXJPKdz (ORCPT ); Tue, 16 Oct 2007 06:33:55 -0400 Date: Tue, 16 Oct 2007 12:33:54 +0200 (CEST) From: Mikulas Patocka To: Nick Piggin cc: Arjan van de Ven , Linux Kernel Mailing List Subject: Re: LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers) In-Reply-To: <20071016002229.GA5851@wotan.suse.de> Message-ID: References: <20071015143732.01d99af8@laptopd505.fenrus.org> <20071016002229.GA5851@wotan.suse.de> X-Personality-Disorder: Schizoid 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: 1177 Lines: 30 On Tue, 16 Oct 2007, Nick Piggin wrote: > > > The cpus also have an explicit set of instructions that deliberately do > > > unordered stores/loads, and s/lfence etc are mostly designed for those. > > > > I know about unordered stores (movnti & similar) --- they basically use > > write-combining method on memory that is normally write-back --- and they > > need sfence. But which one instruction does unordered load and needs > > lefence? > > Also, for non-wb memory. I don't think the Intel document referenced > says anything about this, but the AMD document says that loads can pass > loads (page 8, rule b). > > This is why our rmb() is still an lfence. I see, AMD says that WC memory loads can be out-of-order. There is very little usability to it --- framebuffer and AGP aperture is the only piece of memory that is WC and no kernel structures are placed there, so it is possible to remove that lfence. Mikulas - 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/