From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728Ab1HXXVm (ORCPT ); Wed, 24 Aug 2011 19:21:42 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59094 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054Ab1HXXVl (ORCPT ); Wed, 24 Aug 2011 19:21:41 -0400 MIME-Version: 1.0 In-Reply-To: References: <1314209019.6925.53.camel@twins> <4E555AD0.3020101@goop.org> <4E558236.9000707@goop.org> <4E5583B3.8080309@zytor.com> From: Linus Torvalds Date: Wed, 24 Aug 2011 16:21:17 -0700 Message-ID: Subject: Re: [PATCH 00/18] x86: Ticket lock + cmpxchg cleanup To: "H. Peter Anvin" Cc: Jeremy Fitzhardinge , Peter Zijlstra , Ingo Molnar , "the arch/x86 maintainers" , Linux Kernel Mailing List , Nick Piggin , Jeremy Fitzhardinge Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2011 at 4:09 PM, Linus Torvalds wrote: > > However, the reason I disagree with it is that I don't think that it's > any prettier at all to have the two barriers than it is to just have > the asm. .. and btw, we probably do need *both* barriers. We definitely need the one before. The one after is a bit less obvious, since it is technically legal for code to move into the locked region. However, it's not necessarily a *good* idea for code to move into the locked region, so the two barriers are likely the RightThing(tm). But the two barriers are what makes me think that the C version really isn't any better. And the OOSTORE case then just clinches the deal for me. Linus