Enable RCU list lockdep debugging and drop CONFIG_PROVE_RCU_LIST
PATCH 1/1 Enable RCU list lockdep debugging and drop CONFIG_PROVE_RCU_LIST
From: Madhuparna Bhowmik <[email protected]>
This patch drops the CONFIG_PROVE_RCU_LIST option and instead uses CONFIG_PROVE_RCU for RCU list lockdep debugging.
With this change, RCU list lockdep debugging will be default enabled in CONFIG_PROVE_RCU=y kernels.
Most of the RCU users (in core kernel/, drivers/, and net/ subsystem) have already been modified to include lockdep expressions hence RCU list debugging can be enabled by default.
However, there are still chances of enountering false-positive lockdep splats because not everything is converted, in case RCU list primitives are used in non-RCU read-side critical section but under the protection of a lock. It would be okay to have a few false-positives, as long as bugs are identified, since this patch only affects debugging kernels.
--- include/linux/rculist.h | 2 +- kernel/rcu/Kconfig.debug | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-)
include/linux/rculist.h +1 -1
@@ -56,7 +56,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)#define check_arg_count_one (dummy) -#ifdef CONFIG_PROVE_RCU_LIST +#ifdef CONFIG_PROVE_RCU #define __list_check_rcu(dummy, cond, extra...) \ ({ \ check_arg_count_one(extra); \
kernel/rcu/Kconfig.debug +0 -11
@@ -8,17 +8,6 @@ menu "RCU Debugging" config PROVE_RCU def_bool PROVE_LOCKING -config PROVE_RCU_LIST - bool "RCU list lockdep debugging" - depends on PROVE_RCU && RCU_EXPERT - default n - help - Enable RCU lockdep checking for list usages. By default it is - turned off since there are several list RCU users that still - need to be converted to pass a lockdep expression. To prevent - false-positive splats, we keep it default disabled but once all - users are converted, we can remove this config option. - config TORTURE_TEST tristate default n
Signature · 1 line
2.17.1
Paul E. McKenney
maintainerQuoted 20 lines · On Fri, Feb 28, 2020 at 01:53:55AM +0530, [email protected] wrote:
From: Madhuparna Bhowmik <[email protected]>
This patch drops the
CONFIG_PROVE_RCU_LISToption and instead usesCONFIG_PROVE_RCUfor RCU list lockdep debugging.With this change, RCU list lockdep debugging will be default enabled in
CONFIG_PROVE_RCU=ykernels.Most of the RCU users (in core
kernel/,drivers/, andnet/subsystem) have already been modified to include lockdep expressions hence RCU list debugging can be enabled by default.However, there are still chances of enountering false-positive lockdep splats because not everything is converted, in case RCU list primitives are used in non-RCU read-side critical section but under the protection of a lock. It would be okay to have a few false-positives, as long as bugs are identified, since this patch only affects debugging kernels.
Quoted 3 lines
Co-developed-by Amol Grover <[email protected]>Signed-off-by Amol Grover <[email protected]>Signed-off-by Madhuparna Bhowmik <[email protected]>
Good idea, but could you please left PROVE_RCU_LIST and "select" it from CONFIG_PROVE_RCU instead? This gets the same effect, but also makes it easier to change our minds later if we wish to. It also makes it easier to find the various different types of debugging.
For a template, please see how CONFIG_PROVE_LOCKING controls the value of CONFIG_PROVE_RCU in kernel/rcu/Kconfig.debug.
Thanx, Paul
Quoted 43 lines
--- include/linux/rculist.h | 2 +- kernel/rcu/Kconfig.debug | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-)include/linux/rculist.h +1
-1@@ -56,7 +56,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)#define check_arg_count_one (dummy) -#ifdef CONFIG_PROVE_RCU_LIST +#ifdef CONFIG_PROVE_RCU #define __list_check_rcu(dummy, cond, extra...) \ ({ \ check_arg_count_one(extra); \kernel/rcu/Kconfig.debug +0
-11@@ -8,17 +8,6 @@ menu "RCU Debugging" config PROVE_RCU def_bool PROVE_LOCKING -config PROVE_RCU_LIST - bool "RCU list lockdep debugging" - depends on PROVE_RCU && RCU_EXPERT - default n - help - Enable RCU lockdep checking for list usages. By default it is - turned off since there are several list RCU users that still - need to be converted to pass a lockdep expression. To prevent - false-positive splats, we keep it default disabled but once all - users are converted, we can remove this config option. - config TORTURE_TEST tristate default nSignature · 1 line
2.17.1
Quoted 21 lines · Paul E. McKenney
Quoted 20 lines · On Fri, Feb 28, 2020 at 01:53:55AM +0530, [email protected] wrote:
From: Madhuparna Bhowmik <[email protected]>
This patch drops the
CONFIG_PROVE_RCU_LISToption and instead usesCONFIG_PROVE_RCUfor RCU list lockdep debugging.With this change, RCU list lockdep debugging will be default enabled in
CONFIG_PROVE_RCU=ykernels.Most of the RCU users (in core
kernel/,drivers/, andnet/subsystem) have already been modified to include lockdep expressions hence RCU list debugging can be enabled by default.However, there are still chances of enountering false-positive lockdep splats because not everything is converted, in case RCU list primitives are used in non-RCU read-side critical section but under the protection of a lock. It would be okay to have a few false-positives, as long as bugs are identified, since this patch only affects debugging kernels.
Quoted 9 lines
Quoted 3 lines
Co-developed-by Amol Grover <[email protected]>Signed-off-by Amol Grover <[email protected]>Signed-off-by Madhuparna Bhowmik <[email protected]>Good idea, but could you please left
PROVE_RCU_LISTand "select" it fromCONFIG_PROVE_RCUinstead? This gets the same effect, but also makes it easier to change our minds later if we wish to. It also makes it easier to find the various different types of debugging.
Sure, I have sent the patch with these changes.
Quoted 2 lines
For a template, please see how
CONFIG_PROVE_LOCKINGcontrols the value ofCONFIG_PROVE_RCUinkernel/rcu/Kconfig.debug.
Thank you,
Madhuparna
Quoted 46 lines
Thanx, Paul
Quoted 43 lines
--- include/linux/rculist.h | 2 +- kernel/rcu/Kconfig.debug | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-)include/linux/rculist.h +1
-1@@ -56,7 +56,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list)#define check_arg_count_one (dummy) -#ifdef CONFIG_PROVE_RCU_LIST +#ifdef CONFIG_PROVE_RCU #define __list_check_rcu(dummy, cond, extra...) \ ({ \ check_arg_count_one(extra); \kernel/rcu/Kconfig.debug +0
-11@@ -8,17 +8,6 @@ menu "RCU Debugging" config PROVE_RCU def_bool PROVE_LOCKING -config PROVE_RCU_LIST - bool "RCU list lockdep debugging" - depends on PROVE_RCU && RCU_EXPERT - default n - help - Enable RCU lockdep checking for list usages. By default it is - turned off since there are several list RCU users that still - need to be converted to pass a lockdep expression. To prevent - false-positive splats, we keep it default disabled but once all - users are converted, we can remove this config option. - config TORTURE_TEST tristate default nSignature · 1 line
2.17.1