Return-Path: Received: from pentafluge.infradead.org ([213.146.154.40]:58753 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S932080AbWCCUCz (ORCPT ); Fri, 3 Mar 2006 15:02:55 -0500 Subject: Re: Memory barriers and spin_unlock safety From: Arjan van de Ven In-Reply-To: <1146.1141404346@warthog.cambridge.redhat.com> References: <32518.1141401780@warthog.cambridge.redhat.com> <1146.1141404346@warthog.cambridge.redhat.com> Content-Type: text/plain Date: Fri, 03 Mar 2006 21:02:12 +0100 Message-Id: <1141416133.10732.65.camel@laptopd505.fenrus.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org To: David Howells Cc: torvalds@osdl.org, akpm@osdl.org, mingo@redhat.com, jblunck@suse.de, bcrl@linux.intel.com, matthew@wil.cx, linux-arch@vger.kernel.org, linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org List-ID: On Fri, 2006-03-03 at 16:45 +0000, David Howells wrote: > David Howells wrote: > > > WRITE mtx > > --> implies SFENCE > > Actually, I'm not sure this is true. The AMD64 Instruction Manual's writeup of > SFENCE implies that writes can be reordered, which sort of contradicts what > the AMD64 System Programming Manual says. there are 2 or 3 special instructions which do "non temporal stores" (movntq and movnit and maybe one more). sfense is designed for those.