search for: __builtin_const_p

Displaying 5 results from an estimated 5 matches for "__builtin_const_p".

2007 Nov 30
2
[Bridge] [PATCH] Remove rcu_assign_pointer() penalty for NULL pointers
Hello! The rcu_assign_pointer() primitive currently unconditionally executes a memory barrier, even when a NULL pointer is being assigned. This has lead some to avoid using rcu_assign_pointer() for NULL pointers, which loses the self-documenting advantages of rcu_assign_pointer() This patch uses __builtin_const_p() to omit needless memory barriers for NULL-pointer assignments at compile time with no runtime penalty, as discussed in the following thread: http://www.mail-archive.com/netdev@vger.kernel.org/msg54852.html Tested on x86_64 and ppc64, also compiled the four cases (NULL/non-NULL and const/non-co...
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't...
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
Joe Perches <joe at perches.com> writes: > On Sun, 2014-03-16 at 22:00 -0700, Joe Perches wrote: >> On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: >> >> > Erk, our tests are insufficient. Testbuilding an allmodconfig with this >> > now: >> >> Good idea. >> >> > diff --git a/include/linux/moduleparam.h
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
Joe Perches <joe at perches.com> writes: > On Sun, 2014-03-16 at 22:00 -0700, Joe Perches wrote: >> On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: >> >> > Erk, our tests are insufficient. Testbuilding an allmodconfig with this >> > now: >> >> Good idea. >> >> > diff --git a/include/linux/moduleparam.h