Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbaBGKgW (ORCPT ); Fri, 7 Feb 2014 05:36:22 -0500 Received: from merlin.infradead.org ([205.233.59.134]:43737 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbaBGKgV (ORCPT ); Fri, 7 Feb 2014 05:36:21 -0500 Date: Fri, 7 Feb 2014 11:36:13 +0100 From: Peter Zijlstra To: Torsten Duwe Cc: Scott Wood , linux-kernel@vger.kernel.org, Paul Mackerras , Anton Blanchard , Tom Musta , "Paul E. McKenney" , linuxppc-dev@lists.ozlabs.org, Ingo Molnar Subject: Re: [PATCH] Convert powerpc simple spinlocks into ticket locks Message-ID: <20140207103613.GF5126@laptop.programming.kicks-ass.net> References: <20140206103736.GA18054@lst.de> <20140206163837.GT2936@laptop.programming.kicks-ass.net> <20140206173727.GA13048@lst.de> <1391717992.6733.232.camel@snotra.buserror.net> <20140207090248.GB26811@lst.de> <20140207103139.GP5002@laptop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140207103139.GP5002@laptop.programming.kicks-ass.net> 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 > So if you have ll/sc on the whole word concurrent with the half-word > store, you can loose the half-word store like: > > lwarx &tickets > ... sth &tail > stwcd &tickets > > > The stwcd will over-write the tail store. Oh wait, that's stupid, it will invalidate the lock and fail the store and make it try again, so you could try and combine the load, but you'd need an extra shift instruction instead of an extra load. Not sure that's a valid trade-off.. -- 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/