Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-27 Thread Paul E. McKenney
On Wed, Jan 22, 2014 at 02:09:33PM +0100, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: > > > > > > * Peter Zijlstra wrote: > > > > > > > On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: > > > > > And if

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-27 Thread Paul E. McKenney
On Wed, Jan 22, 2014 at 02:09:33PM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote:

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > > > On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: > > > > And if somebody tries to do a "smp_store_release()" on a random > > > > structure or union,

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Peter Zijlstra
On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: > > > 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

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: > > 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. > > Hurm, and here

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Peter Zijlstra
On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: > 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. Hurm, and here I thought warning on insane code was a

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Peter Zijlstra
On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: 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. Hurm, and here I thought warning on insane code was a good

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: 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. Hurm,

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Peter Zijlstra
On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: And if somebody tries to do a smp_store_release() on a random structure or union, do we care? We're not some nanny

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-22 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Wed, Jan 22, 2014 at 01:09:17PM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Tue, Jan 21, 2014 at 04:31:56PM -0800, Linus Torvalds wrote: And if somebody tries to do a smp_store_release() on a random

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
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) ||

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Linus Torvalds
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)) > #

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
On 01/21/2014 10:39 AM, Peter Zijlstra wrote: On Tue, Jan 21, 2014 at 10:36:48AM -0500, Waiman Long wrote: On 01/20/2014 10:03 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Peter Zijlstra
On Tue, Jan 21, 2014 at 10:36:48AM -0500, Waiman Long wrote: > On 01/20/2014 10:03 AM, Peter Zijlstra wrote: > >On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: > >>The generic __native_word() macro defined in include/linux/compiler.h > >>only allows "int" and "long" data types to be

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
On 01/20/2014 10:03 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only allows "int" and "long" data types to be treated as native and atomic. The x86 architecture, however, allow the

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
On 01/20/2014 10:03 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only allows int and long data types to be treated as native and atomic. The x86 architecture, however, allow the use

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Peter Zijlstra
On Tue, Jan 21, 2014 at 10:36:48AM -0500, Waiman Long wrote: On 01/20/2014 10:03 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only allows int and long data types to be treated as

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
On 01/21/2014 10:39 AM, Peter Zijlstra wrote: On Tue, Jan 21, 2014 at 10:36:48AM -0500, Waiman Long wrote: On 01/20/2014 10:03 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Linus Torvalds
On Tue, Jan 21, 2014 at 8:09 AM, Waiman Long waiman.l...@hp.com 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) ==

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-21 Thread Waiman Long
On 01/21/2014 07:31 PM, Linus Torvalds wrote: On Tue, Jan 21, 2014 at 8:09 AM, Waiman Longwaiman.l...@hp.com 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)

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-20 Thread Peter Zijlstra
On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: > The generic __native_word() macro defined in include/linux/compiler.h > only allows "int" and "long" data types to be treated as native and > atomic. The x86 architecture, however, allow the use of char and short > data types as atomic

Re: [PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-20 Thread Peter Zijlstra
On Tue, Jan 14, 2014 at 11:44:05PM -0500, Waiman Long wrote: The generic __native_word() macro defined in include/linux/compiler.h only allows int and long data types to be treated as native and atomic. The x86 architecture, however, allow the use of char and short data types as atomic as

[PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-14 Thread Waiman Long
The generic __native_word() macro defined in include/linux/compiler.h only allows "int" and "long" data types to be treated as native and atomic. The x86 architecture, however, allow the use of char and short data types as atomic as well. This patch extends the data type allowed in the

[PATCH v9 3/5] qrwlock, x86 - Treat all data type not bigger than long as atomic in x86

2014-01-14 Thread Waiman Long
The generic __native_word() macro defined in include/linux/compiler.h only allows int and long data types to be treated as native and atomic. The x86 architecture, however, allow the use of char and short data types as atomic as well. This patch extends the data type allowed in the