From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687Ab1HXXFn (ORCPT ); Wed, 24 Aug 2011 19:05:43 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54879 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821Ab1HXXFm (ORCPT ); Wed, 24 Aug 2011 19:05:42 -0400 Message-ID: <4E5583B3.8080309@zytor.com> Date: Wed, 24 Aug 2011 16:05:23 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Jeremy Fitzhardinge CC: Linus Torvalds , Peter Zijlstra , Ingo Molnar , the arch/x86 maintainers , Linux Kernel Mailing List , Nick Piggin , Jeremy Fitzhardinge Subject: Re: [PATCH 00/18] x86: Ticket lock + cmpxchg cleanup References: <1314209019.6925.53.camel@twins> <4E555AD0.3020101@goop.org> <4E558236.9000707@goop.org> In-Reply-To: <4E558236.9000707@goop.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/24/2011 03:59 PM, Jeremy Fitzhardinge wrote: > On 08/24/2011 03:53 PM, Linus Torvalds wrote: >> On Wed, Aug 24, 2011 at 1:10 PM, Jeremy Fitzhardinge wrote: >>> Could we just kill SMP support for OOSTORE machines now? That would be >>> the cleanest possible fix... >> No it wouldn't. The asm version would *still* be cleaner than the "C >> plus random barriers". >> >> It's not like the C version is "portable" in any case. > > If there's no need to have a locked instruction, then it could simply be: > > barrier(); > lock->head++; > barrier(); > > with no need for asm at all. > That's not guaranteed in any way to generate a locally atomic instruction. -hpa