Re: [PATCH] rcu: remove SPARSE_RCU_POINTER

Previous thread: [PATCH] rcu: call __rcu_read_unlock() in exit_rcu() by Lai Jiangshan on Tuesday, January 4, 2011 - 1:32 am. (1 message)

Next thread: [PATCH] fs/9p: Use the correct dentry operations by Aneesh Kumar K.V on Tuesday, January 4, 2011 - 1:44 am. (1 message)
From: Lai Jiangshan
Date: Tuesday, January 4, 2011 - 1:43 am

As I known, __rcu annotations do not effect the result compiled kernel.

They work only when we use spare("make C=1" or "make C=2"),
So we don't need another new switch for it since we have one
for debugging(use spare or not).

signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 320d6c9..0ab21c2 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -16,11 +16,7 @@
 # define __release(x)	__context__(x,-1)
 # define __cond_lock(x,c)	((c) ? ({ __acquire(x); 1; }) : 0)
 # define __percpu	__attribute__((noderef, address_space(3)))
-#ifdef CONFIG_SPARSE_RCU_POINTER
 # define __rcu		__attribute__((noderef, address_space(4)))
-#else
-# define __rcu
-#endif
 extern void __chk_user_ptr(const volatile void __user *);
 extern void __chk_io_ptr(const volatile void __iomem *);
 #else
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8be18e5..bf9c5d3 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -563,21 +563,6 @@ config PROVE_RCU_REPEATEDLY
 
 	 Say N if you are unsure.
 
-config SPARSE_RCU_POINTER
-	bool "RCU debugging: sparse-based checks for pointer usage"
-	default n
-	help
-	 This feature enables the __rcu sparse annotation for
-	 RCU-protected pointers.  This annotation will cause sparse
-	 to flag any non-RCU used of annotated pointers.  This can be
-	 helpful when debugging RCU usage.  Please note that this feature
-	 is not intended to enforce code cleanliness; it is instead merely
-	 a debugging aid.
-
-	 Say Y to make sparse flag questionable use of RCU-protected pointers
-
-	 Say N if you are unsure.
-
 config LOCKDEP
 	bool
 	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
--

From: Arnd Bergmann
Date: Tuesday, January 4, 2011 - 3:36 am

The intention of this option was to avoid introducing an excessive
number of false positives when using sparse.

We should only make that unconditional if we are reasonably convinced
that all the majority of warnings caused by it should actually
lead to changes in the code.

	Arnd
--

From: Paul E. McKenney
Date: Tuesday, January 4, 2011 - 2:19 pm

I agree with Arnd here -- the changes required are extensive in many
cases, and a number of subsystems are making decent progress.

							Thanx, Paul
--

Previous thread: [PATCH] rcu: call __rcu_read_unlock() in exit_rcu() by Lai Jiangshan on Tuesday, January 4, 2011 - 1:32 am. (1 message)

Next thread: [PATCH] fs/9p: Use the correct dentry operations by Aneesh Kumar K.V on Tuesday, January 4, 2011 - 1:44 am. (1 message)