Files
kernel_xiaomi_sm8250/include/linux
Paul E. McKenney d99c4f6b13 Remove rcu_assign_pointer() penalty for NULL pointers
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-const) with gcc version 4.1.2, and hand-checked the
assembly output.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:06 -08:00
..
2008-02-05 09:44:13 -08:00
2008-02-05 03:20:13 -08:00
2008-02-06 10:41:02 -08:00
2008-02-01 11:34:49 +01:00
2008-02-03 17:45:46 +02:00
2008-01-30 13:31:10 +01:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-03 17:45:46 +02:00
2008-01-30 13:31:56 +01:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-05 09:44:19 -08:00
2008-01-30 13:30:27 +01:00
2008-02-05 09:44:07 -08:00
2008-02-06 02:57:51 +01:00
2008-02-01 16:13:16 -05:00
2008-01-31 19:26:46 -08:00
2008-02-06 10:41:02 -08:00
2008-01-31 19:28:20 -08:00
2008-02-06 10:41:04 -08:00
2008-01-30 13:33:13 +01:00
2008-02-03 17:45:46 +02:00
2008-02-06 10:41:01 -08:00
2008-02-05 09:44:16 -08:00
2008-01-30 02:06:08 -05:00
2008-02-05 09:44:19 -08:00
2008-02-02 11:32:01 -08:00
2008-02-02 02:44:34 +03:00
2008-02-05 03:20:13 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-01-30 13:30:53 +01:00
2008-02-05 09:44:22 -08:00
2008-01-30 13:31:47 +01:00
2008-01-31 19:26:46 -08:00
2008-02-06 10:41:02 -08:00
2008-02-04 10:56:03 -08:00
2008-02-03 17:45:46 +02:00
2008-01-31 19:28:30 -08:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-02-05 09:44:15 -08:00
2008-02-05 09:44:16 -08:00
2008-02-05 09:44:07 -08:00
2008-02-01 17:45:14 +01:00
2008-02-06 10:41:02 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:03 +11:00
2008-02-06 10:41:03 -08:00
2008-02-05 09:44:07 -08:00
2008-02-03 15:42:53 +02:00