Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933369AbaBUR1O (ORCPT ); Fri, 21 Feb 2014 12:27:14 -0500 Received: from merlin.infradead.org ([205.233.59.134]:44400 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932255AbaBUR1N (ORCPT ); Fri, 21 Feb 2014 12:27:13 -0500 Date: Fri, 21 Feb 2014 18:26:33 +0100 From: Peter Zijlstra To: Waiman Long Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann , linux-arch@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Andrew Morton , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Linus Torvalds , Raghavendra K T , George Spelvin , Tim Chen , Daniel J Blueman , Alexander Fyodorov , Aswin Chandramouleeswaran , Scott J Norton , Thavatchai Makphaibulchoke Subject: Re: [PATCH v4 3/3] qspinlock, x86: Add x86 specific optimization for 2 contending tasks Message-ID: <20140221172633.GR9987@twins.programming.kicks-ass.net> References: <1392669684-4807-1-git-send-email-Waiman.Long@hp.com> <1392669684-4807-4-git-send-email-Waiman.Long@hp.com> <20140221121222.GQ9987@twins.programming.kicks-ass.net> <530787F3.6020400@hp.com> <53078865.8060808@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53078865.8060808@hp.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2014 at 12:09:57PM -0500, Waiman Long wrote: > On 02/21/2014 12:08 PM, Waiman Long wrote: > >On 02/21/2014 07:12 AM, Peter Zijlstra wrote: > >> > >>Why is this x86 only code? > > > >The code is making use of the fact that byte write is atomic which is true > >in x86 and probably in a few other architectures. I could pull these codes > >into the generic qspinlock.c file and set a flag in the asm header file to > >activate it if it is what you want. > > > >-Longman > > BTW, I also assume that 8-bit and 16-bit cmpxchg() and xchg() are available. Right, screw Alpha :-) Just pull it into the generic code; its far too much code to replicate per arch. -- 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/