Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511AbaAWUqR (ORCPT ); Thu, 23 Jan 2014 15:46:17 -0500 Received: from g4t0015.houston.hp.com ([15.201.24.18]:8881 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754027AbaAWUqN (ORCPT ); Thu, 23 Jan 2014 15:46:13 -0500 Message-ID: <52E17F7E.1030803@hp.com> Date: Thu, 23 Jan 2014 15:45:50 -0500 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Linus Torvalds CC: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann , "linux-arch@vger.kernel.org" , the arch/x86 maintainers , Linux Kernel Mailing List , Steven Rostedt , Andrew Morton , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Raghavendra K T , George Spelvin , Tim Chen , "Chandramouleeswaran, Aswin" , Scott J Norton Subject: Re: [PATCH v10 1/4] qrwlock: A queue read/write lock implementation References: <1390426438-31252-1-git-send-email-Waiman.Long@hp.com> <1390426438-31252-2-git-send-email-Waiman.Long@hp.com> <20140123100751.GS30183@twins.programming.kicks-ass.net> <52E14D67.4000202@hp.com> <52E155A8.7000206@hp.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/23/2014 12:52 PM, Linus Torvalds wrote: > On Thu, Jan 23, 2014 at 9:47 AM, Waiman Long wrote: >> Thank for the info. I am less familiar with that kind of issues on other >> architecture. I will add a smp_mb__after_atomic_dec()& send out a new >> patch. > SInce it's the unlock path,. you need to use the "mb__*before*" > versions, since presumably you want to protect what is inside the lock > from leaking out, not some random thing after the lock from leaking > in.. > > Linus My bad. I am a bit sloppy not using the right function in my email. I will certainly put the right mb functions depending on whether it is a lock or unlock function. -Longman -- 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/