Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-24 Thread Pekka Enberg
Hello, On Tue, Apr 23, 2013 at 12:16 AM, Andrew Morton wrote: > The patch made index_of() weaker! > > It's probably all a bit academic, given that linux-next does > > -/* > - * This function must be completely optimized away if a constant is passed to > - * it. Mostly the same as what is in linu

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-22 Thread Behan Webster
On 13-04-22 03:58 PM, Steven Rostedt wrote: On Mon, 2013-04-22 at 13:44 -0700, Andrew Morton wrote: On Wed, 17 Apr 2013 17:03:21 -0700 (PDT) David Rientjes wrote: On Wed, 17 Apr 2013, Steven Rostedt wrote: The slab.c code has a size check macro that checks the size of the following structs

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-22 Thread Steven Rostedt
On Mon, 2013-04-22 at 14:16 -0700, Andrew Morton wrote: > On Mon, 22 Apr 2013 16:58:21 -0400 Steven Rostedt wrote: > > When looking into this, we found the only two users of the index_of() > > static function that has this issue, passes in size_of(), which will > > always be a constant, making th

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-22 Thread Andrew Morton
On Mon, 22 Apr 2013 16:58:21 -0400 Steven Rostedt wrote: > On Mon, 2013-04-22 at 13:44 -0700, Andrew Morton wrote: > > On Wed, 17 Apr 2013 17:03:21 -0700 (PDT) David Rientjes > > wrote: > > > > > On Wed, 17 Apr 2013, Steven Rostedt wrote: > > > > > > > The slab.c code has a size check macro t

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-22 Thread Steven Rostedt
On Mon, 2013-04-22 at 13:44 -0700, Andrew Morton wrote: > On Wed, 17 Apr 2013 17:03:21 -0700 (PDT) David Rientjes > wrote: > > > On Wed, 17 Apr 2013, Steven Rostedt wrote: > > > > > The slab.c code has a size check macro that checks the size of the > > > following structs: > > > > > > struct a

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-22 Thread Andrew Morton
On Wed, 17 Apr 2013 17:03:21 -0700 (PDT) David Rientjes wrote: > On Wed, 17 Apr 2013, Steven Rostedt wrote: > > > The slab.c code has a size check macro that checks the size of the > > following structs: > > > > struct arraycache_init > > struct kmem_list3 > > > > The index_of() function that

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-18 Thread Borislav Petkov
On Wed, Apr 17, 2013 at 05:32:03PM -0700, David Rientjes wrote: > On Thu, 18 Apr 2013, Will Huck wrote: > > > In normal case, builtin_constant_p() is used for what? > > > http://gcc.gnu.org/onlinedocs/ Yeah, there's also this very educating site for situations like this one: http://lmgtfy.com

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-17 Thread David Rientjes
On Thu, 18 Apr 2013, Will Huck wrote: > In normal case, builtin_constant_p() is used for what? > http://gcc.gnu.org/onlinedocs/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.ker

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-17 Thread Will Huck
Hi Steven, On 04/18/2013 03:09 AM, Steven Rostedt wrote: The slab.c code has a size check macro that checks the size of the following structs: struct arraycache_init struct kmem_list3 The index_of() function that takes the sizeof() of the above two structs and does an unnecessary __builtin_cons

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-17 Thread David Rientjes
On Wed, 17 Apr 2013, Steven Rostedt wrote: > The slab.c code has a size check macro that checks the size of the > following structs: > > struct arraycache_init > struct kmem_list3 > > The index_of() function that takes the sizeof() of the above two structs > and does an unnecessary __builtin_con