From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86 Date: Tue, 21 Jan 2014 23:42:32 -0500 Message-ID: <52DF4C38.7040003@hp.com> References: <1389761047-47566-1-git-send-email-Waiman.Long@hp.com> <1389761047-47566-4-git-send-email-Waiman.Long@hp.com> <20140120150316.GG30183@twins.programming.kicks-ass.net> <52DE9410.6090500@hp.com> <20140121153958.GA31570@twins.programming.kicks-ass.net> <52DE9BB0.5070909@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds , Peter Zijlstra Cc: 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 List-Id: linux-arch.vger.kernel.org On 01/21/2014 07:31 PM, Linus Torvalds wrote: > On Tue, Jan 21, 2014 at 8:09 AM, Waiman Long wrote: >> include/linux/compiler.h: >> >> #ifndef __native_word >> # ifdef __arch_native_word(t) >> # define __native_word(t) __arch_native_word(t) >> # else >> # define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == siizeof(long)) >> # endif >> #endif > Do we even really need this? > > I'd suggest removing it entirely. You might want to retain the whole > > compiletime_assert_atomic_type() > > thing on purely the alpha side, but then it's all inside just the > alpha code, without any need for this "native_word" thing. > > And if somebody tries to do a "smp_store_release()" on a random > structure or union, do we care? We're not some nanny state that wants > to give nice warnings for insane code. > > Linus That sounds good to me too. Peter, what do you think about this? -Longman From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g6t0186.atlanta.hp.com ([15.193.32.63]:18328 "EHLO g6t0186.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbaAVEmi (ORCPT ); Tue, 21 Jan 2014 23:42:38 -0500 Message-ID: <52DF4C38.7040003@hp.com> Date: Tue, 21 Jan 2014 23:42:32 -0500 From: Waiman Long MIME-Version: 1.0 Subject: Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86 References: <1389761047-47566-1-git-send-email-Waiman.Long@hp.com> <1389761047-47566-4-git-send-email-Waiman.Long@hp.com> <20140120150316.GG30183@twins.programming.kicks-ass.net> <52DE9410.6090500@hp.com> <20140121153958.GA31570@twins.programming.kicks-ass.net> <52DE9BB0.5070909@hp.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds , Peter Zijlstra Cc: 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 Message-ID: <20140122044232.jXUlyoszYqXH8F_CV24M4vuNdcBbLv5xQu-yB_UQMas@z> On 01/21/2014 07:31 PM, Linus Torvalds wrote: > On Tue, Jan 21, 2014 at 8:09 AM, Waiman Long wrote: >> include/linux/compiler.h: >> >> #ifndef __native_word >> # ifdef __arch_native_word(t) >> # define __native_word(t) __arch_native_word(t) >> # else >> # define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == siizeof(long)) >> # endif >> #endif > Do we even really need this? > > I'd suggest removing it entirely. You might want to retain the whole > > compiletime_assert_atomic_type() > > thing on purely the alpha side, but then it's all inside just the > alpha code, without any need for this "native_word" thing. > > And if somebody tries to do a "smp_store_release()" on a random > structure or union, do we care? We're not some nanny state that wants > to give nice warnings for insane code. > > Linus That sounds good to me too. Peter, what do you think about this? -Longman