Skip to contentSkip to conversation

rcu: Remove redundant CONFIG_PREEMPT_RCU option

PATCH In review Pranith Kumar 3 participants 6 messages Sep 21, 2014 – Sep 22, 2014

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: Remove redundant CONFIG_PREEMPT_RCU option

PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes CONFIG_PREEMPT_RCU and uses CONFIG_TREE_PREEMPT_RCU in its place.

---
 arch/xtensa/configs/s6105_defconfig                      |  2 +-
 include/linux/init_task.h                                |  2 +-
 include/linux/rcupdate.h                                 | 16 ++++++++--------
 include/linux/sched.h                                    | 10 +++++-----
 init/Kconfig                                             |  6 ------
 kernel/rcu/update.c                                      |  4 ++--
 tools/testing/selftests/rcutorture/doc/TINY_RCU.txt      |  2 +-
 .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt        |  2 +-
 8 files changed, 19 insertions(+), 25 deletions(-)
arch/xtensa/configs/s6105_defconfig +1 -1
index 12a492a..dab1a99 100644
@@ -35,7 +35,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 #
 # CONFIG_CLASSIC_RCU is not set
 # CONFIG_TREE_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TREE_PREEMPT_RCU=y
 # CONFIG_RCU_TRACE is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_PREEMPT_RCU_TRACE is not set
include/linux/init_task.h +1 -1
index 77fc43f..39600f4 100644
@@ -108,7 +108,7 @@ extern struct group_info init_groups;
 #else
 #define INIT_TASK_RCU_TREE_PREEMPT(tsk)
 #endif
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 #define INIT_TASK_RCU_PREEMPT(tsk)					\
 	.rcu_read_lock_nesting = 0,					\
 	.rcu_read_unlock_special.s = 0,					\
include/linux/rcupdate.h +8 -8
index a4a819f..17a15d5 100644
@@ -103,7 +103,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 
 /* Exported common interfaces */
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -140,12 +140,12 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 void call_rcu(struct rcu_head *head,
 	      void (*func)(struct rcu_head *head));
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* In classic RCU, call_rcu() is just call_rcu_sched(). */
 #define	call_rcu	call_rcu_sched
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /**
  * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
@@ -217,7 +217,7 @@ void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head));
 void synchronize_rcu_tasks(void);
 void rcu_barrier_tasks(void);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 void __rcu_read_lock(void);
 void __rcu_read_unlock(void);
@@ -227,12 +227,12 @@ void synchronize_rcu(void);
 /*
  * Defined as a macro as it is a very low level header included from
  * areas that don't even know about current.  This gives the rcu_read_lock()
- * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other
+ * nesting depth, but makes sense only if CONFIG_TREE_PREEMPT_RCU -- in other
  * types of kernel builds, the rcu_read_lock() nesting depth is unknowable.
  */
 #define rcu_preempt_depth() (current->rcu_read_lock_nesting)
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 static inline void __rcu_read_lock(void)
 {
@@ -254,7 +254,7 @@ static inline int rcu_preempt_depth(void)
 	return 0;
 }
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* Internal to kernel */
 void rcu_init(void);
@@ -530,7 +530,7 @@ static inline int rcu_read_lock_sched_held(void)
 		}							\
 	} while (0)
 
-#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_TREE_PREEMPT_RCU)
 static inline void rcu_preempt_sleep_check(void)
 {
 	rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
include/linux/sched.h +5 -5
index 42888d7..6acaa30 100644
@@ -1269,11 +1269,11 @@ struct task_struct {
 	int nr_cpus_allowed;
 	cpumask_t cpus_allowed;
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	int rcu_read_lock_nesting;
 	union rcu_special rcu_read_unlock_special;
 	struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
 	struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
@@ -2014,12 +2014,12 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	p->rcu_read_lock_nesting = 0;
 	p->rcu_read_unlock_special.s = 0;
 	p->rcu_blocked_node = NULL;
 	INIT_LIST_HEAD(&p->rcu_node_entry);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
 	p->rcu_tasks_holdout = false;
 	INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
@@ -2752,7 +2752,7 @@ extern int __cond_resched_softirq(void);
 
 static inline void cond_resched_rcu(void)
 {
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_TREE_PREEMPT_RCU)
 	rcu_read_unlock();
 	cond_resched();
 	rcu_read_lock();
init/Kconfig +0 -6
index 8a2b97c..27ad03c 100644
@@ -501,12 +501,6 @@ config TINY_RCU
 
 endchoice
 
-config PREEMPT_RCU
-	def_bool TREE_PREEMPT_RCU
-	help
-	  This option enables preemptible-RCU code that is common between
-	  TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
-
 config TASKS_RCU
 	bool "Task_based RCU implementation using voluntary context switch"
 	default n
kernel/rcu/update.c +2 -2
index 3ef8ba5..8848a32 100644
@@ -62,7 +62,7 @@ MODULE_ALIAS("rcupdate");
 
 module_param(rcu_expedited, int, 0);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /*
  * Preemptible RCU implementation for rcu_read_lock().
@@ -108,7 +108,7 @@ void __rcu_read_unlock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_unlock);
 
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key rcu_lock_key;
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt +1 -1
index 28db67b..4fea92d 100644
@@ -31,7 +31,7 @@ CONFIG_RCU_TORTURE_TEST
 
 CONFIG_HOTPLUG_CPU
 CONFIG_PREEMPT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 CONFIG_SMP
 CONFIG_TINY_RCU
 CONFIG_TREE_PREEMPT_RCU
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt +1 -1
index f85c45e..081dece 100644
@@ -62,7 +62,7 @@ CONFIG_NO_HZ_FULL_SYSIDLE_SMALL
 	Defer until Frederic uses this.
 
 CONFIG_PREEMPT_COUNT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 
 	Redundant with CONFIG_PREEMPT, ignore.
 
Signature · 1 line
2.1.0
maintainer
#1 lore raw
Quoted 5 lines · Pranith Kumar

PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes CONFIG_PREEMPT_RCU and uses CONFIG_TREE_PREEMPT_RCU in its place.

I think it would actually make more sense to do this the other way around, if at all: drop TREE_PREEMPT_RCU in favor of PREEMPT_RCU. The instances shown here don't care about *which* preemptible RCU implementation the kernel uses, they just need to behave differently when preemptible. Let's also not assume that no new RCU implementation will ever arise superceding TREE_PREEMPT_RCU.

- Josh Triplett

Quoted 216 lines
 arch/xtensa/configs/s6105_defconfig                      |  2 +-
 include/linux/init_task.h                                |  2 +-
 include/linux/rcupdate.h                                 | 16 ++++++++--------
 include/linux/sched.h                                    | 10 +++++-----
 init/Kconfig                                             |  6 ------
 kernel/rcu/update.c                                      |  4 ++--
 tools/testing/selftests/rcutorture/doc/TINY_RCU.txt      |  2 +-
 .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt        |  2 +-
 8 files changed, 19 insertions(+), 25 deletions(-)
arch/xtensa/configs/s6105_defconfig +1 -1
index 12a492a..dab1a99 100644
@@ -35,7 +35,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 #
 # CONFIG_CLASSIC_RCU is not set
 # CONFIG_TREE_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TREE_PREEMPT_RCU=y
 # CONFIG_RCU_TRACE is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_PREEMPT_RCU_TRACE is not set
include/linux/init_task.h +1 -1
index 77fc43f..39600f4 100644
@@ -108,7 +108,7 @@ extern struct group_info init_groups;
 #else
 #define INIT_TASK_RCU_TREE_PREEMPT(tsk)
 #endif
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 #define INIT_TASK_RCU_PREEMPT(tsk)					\
 	.rcu_read_lock_nesting = 0,					\
 	.rcu_read_unlock_special.s = 0,					\
include/linux/rcupdate.h +8 -8
index a4a819f..17a15d5 100644
@@ -103,7 +103,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 
 /* Exported common interfaces */
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -140,12 +140,12 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 void call_rcu(struct rcu_head *head,
 	      void (*func)(struct rcu_head *head));
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* In classic RCU, call_rcu() is just call_rcu_sched(). */
 #define	call_rcu	call_rcu_sched
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /**
  * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
@@ -217,7 +217,7 @@ void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head));
 void synchronize_rcu_tasks(void);
 void rcu_barrier_tasks(void);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 void __rcu_read_lock(void);
 void __rcu_read_unlock(void);
@@ -227,12 +227,12 @@ void synchronize_rcu(void);
 /*
  * Defined as a macro as it is a very low level header included from
  * areas that don't even know about current.  This gives the rcu_read_lock()
- * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other
+ * nesting depth, but makes sense only if CONFIG_TREE_PREEMPT_RCU -- in other
  * types of kernel builds, the rcu_read_lock() nesting depth is unknowable.
  */
 #define rcu_preempt_depth() (current->rcu_read_lock_nesting)
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 static inline void __rcu_read_lock(void)
 {
@@ -254,7 +254,7 @@ static inline int rcu_preempt_depth(void)
 	return 0;
 }
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* Internal to kernel */
 void rcu_init(void);
@@ -530,7 +530,7 @@ static inline int rcu_read_lock_sched_held(void)
 		}							\
 	} while (0)
 
-#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_TREE_PREEMPT_RCU)
 static inline void rcu_preempt_sleep_check(void)
 {
 	rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
include/linux/sched.h +5 -5
index 42888d7..6acaa30 100644
@@ -1269,11 +1269,11 @@ struct task_struct {
 	int nr_cpus_allowed;
 	cpumask_t cpus_allowed;
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	int rcu_read_lock_nesting;
 	union rcu_special rcu_read_unlock_special;
 	struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
 	struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
@@ -2014,12 +2014,12 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	p->rcu_read_lock_nesting = 0;
 	p->rcu_read_unlock_special.s = 0;
 	p->rcu_blocked_node = NULL;
 	INIT_LIST_HEAD(&p->rcu_node_entry);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
 	p->rcu_tasks_holdout = false;
 	INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
@@ -2752,7 +2752,7 @@ extern int __cond_resched_softirq(void);
 
 static inline void cond_resched_rcu(void)
 {
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_TREE_PREEMPT_RCU)
 	rcu_read_unlock();
 	cond_resched();
 	rcu_read_lock();
init/Kconfig +0 -6
index 8a2b97c..27ad03c 100644
@@ -501,12 +501,6 @@ config TINY_RCU
 
 endchoice
 
-config PREEMPT_RCU
-	def_bool TREE_PREEMPT_RCU
-	help
-	  This option enables preemptible-RCU code that is common between
-	  TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
-
 config TASKS_RCU
 	bool "Task_based RCU implementation using voluntary context switch"
 	default n
kernel/rcu/update.c +2 -2
index 3ef8ba5..8848a32 100644
@@ -62,7 +62,7 @@ MODULE_ALIAS("rcupdate");
 
 module_param(rcu_expedited, int, 0);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /*
  * Preemptible RCU implementation for rcu_read_lock().
@@ -108,7 +108,7 @@ void __rcu_read_unlock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_unlock);
 
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key rcu_lock_key;
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt +1 -1
index 28db67b..4fea92d 100644
@@ -31,7 +31,7 @@ CONFIG_RCU_TORTURE_TEST
 
 CONFIG_HOTPLUG_CPU
 CONFIG_PREEMPT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 CONFIG_SMP
 CONFIG_TINY_RCU
 CONFIG_TREE_PREEMPT_RCU
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt +1 -1
index f85c45e..081dece 100644
@@ -62,7 +62,7 @@ CONFIG_NO_HZ_FULL_SYSIDLE_SMALL
 	Defer until Frederic uses this.
 
 CONFIG_PREEMPT_COUNT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 
 	Redundant with CONFIG_PREEMPT, ignore.
 
Signature · 1 line
2.1.0
#2 lore raw
Quoted 5 lines · Josh Triplett
Quoted 4 lines · Pranith Kumar

PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes CONFIG_PREEMPT_RCU and uses CONFIG_TREE_PREEMPT_RCU in its place.

Quoted 8 lines
Quoted 1 line

I think it would actually make more sense to do this the other way around, if at all: drop TREE_PREEMPT_RCU in favor of PREEMPT_RCU. The instances shown here don't care about *which* preemptible RCU implementation the kernel uses, they just need to behave differently when preemptible. Let's also not assume that no new RCU implementation will ever arise superceding TREE_PREEMPT_RCU.

Given that there has thus far been no fewer than three distinct implementations of PREEMPT_RCU (one in -rt, the first in mainline, and the current one in mainline), it would indeed be quite wise to avoid assuming that there never will be some new PREEMPT_RCU implementation. ;-)

Thanx, Paul

Quoted 219 lines

- Josh Triplett

Quoted 216 lines
 arch/xtensa/configs/s6105_defconfig                      |  2 +-
 include/linux/init_task.h                                |  2 +-
 include/linux/rcupdate.h                                 | 16 ++++++++--------
 include/linux/sched.h                                    | 10 +++++-----
 init/Kconfig                                             |  6 ------
 kernel/rcu/update.c                                      |  4 ++--
 tools/testing/selftests/rcutorture/doc/TINY_RCU.txt      |  2 +-
 .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt        |  2 +-
 8 files changed, 19 insertions(+), 25 deletions(-)
arch/xtensa/configs/s6105_defconfig +1 -1
index 12a492a..dab1a99 100644
@@ -35,7 +35,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 #
 # CONFIG_CLASSIC_RCU is not set
 # CONFIG_TREE_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TREE_PREEMPT_RCU=y
 # CONFIG_RCU_TRACE is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_PREEMPT_RCU_TRACE is not set
include/linux/init_task.h +1 -1
index 77fc43f..39600f4 100644
@@ -108,7 +108,7 @@ extern struct group_info init_groups;
 #else
 #define INIT_TASK_RCU_TREE_PREEMPT(tsk)
 #endif
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 #define INIT_TASK_RCU_PREEMPT(tsk)					\
 	.rcu_read_lock_nesting = 0,					\
 	.rcu_read_unlock_special.s = 0,					\
include/linux/rcupdate.h +8 -8
index a4a819f..17a15d5 100644
@@ -103,7 +103,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 
 /* Exported common interfaces */
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -140,12 +140,12 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 void call_rcu(struct rcu_head *head,
 	      void (*func)(struct rcu_head *head));
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* In classic RCU, call_rcu() is just call_rcu_sched(). */
 #define	call_rcu	call_rcu_sched
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /**
  * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
@@ -217,7 +217,7 @@ void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head));
 void synchronize_rcu_tasks(void);
 void rcu_barrier_tasks(void);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 void __rcu_read_lock(void);
 void __rcu_read_unlock(void);
@@ -227,12 +227,12 @@ void synchronize_rcu(void);
 /*
  * Defined as a macro as it is a very low level header included from
  * areas that don't even know about current.  This gives the rcu_read_lock()
- * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other
+ * nesting depth, but makes sense only if CONFIG_TREE_PREEMPT_RCU -- in other
  * types of kernel builds, the rcu_read_lock() nesting depth is unknowable.
  */
 #define rcu_preempt_depth() (current->rcu_read_lock_nesting)
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 static inline void __rcu_read_lock(void)
 {
@@ -254,7 +254,7 @@ static inline int rcu_preempt_depth(void)
 	return 0;
 }
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* Internal to kernel */
 void rcu_init(void);
@@ -530,7 +530,7 @@ static inline int rcu_read_lock_sched_held(void)
 		}							\
 	} while (0)
 
-#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_TREE_PREEMPT_RCU)
 static inline void rcu_preempt_sleep_check(void)
 {
 	rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
include/linux/sched.h +5 -5
index 42888d7..6acaa30 100644
@@ -1269,11 +1269,11 @@ struct task_struct {
 	int nr_cpus_allowed;
 	cpumask_t cpus_allowed;
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	int rcu_read_lock_nesting;
 	union rcu_special rcu_read_unlock_special;
 	struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
 	struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
@@ -2014,12 +2014,12 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 	p->rcu_read_lock_nesting = 0;
 	p->rcu_read_unlock_special.s = 0;
 	p->rcu_blocked_node = NULL;
 	INIT_LIST_HEAD(&p->rcu_node_entry);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
 	p->rcu_tasks_holdout = false;
 	INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
@@ -2752,7 +2752,7 @@ extern int __cond_resched_softirq(void);
 
 static inline void cond_resched_rcu(void)
 {
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_TREE_PREEMPT_RCU)
 	rcu_read_unlock();
 	cond_resched();
 	rcu_read_lock();
init/Kconfig +0 -6
index 8a2b97c..27ad03c 100644
@@ -501,12 +501,6 @@ config TINY_RCU
 
 endchoice
 
-config PREEMPT_RCU
-	def_bool TREE_PREEMPT_RCU
-	help
-	  This option enables preemptible-RCU code that is common between
-	  TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
-
 config TASKS_RCU
 	bool "Task_based RCU implementation using voluntary context switch"
 	default n
kernel/rcu/update.c +2 -2
index 3ef8ba5..8848a32 100644
@@ -62,7 +62,7 @@ MODULE_ALIAS("rcupdate");
 
 module_param(rcu_expedited, int, 0);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /*
  * Preemptible RCU implementation for rcu_read_lock().
@@ -108,7 +108,7 @@ void __rcu_read_unlock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_unlock);
 
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key rcu_lock_key;
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt +1 -1
index 28db67b..4fea92d 100644
@@ -31,7 +31,7 @@ CONFIG_RCU_TORTURE_TEST
 
 CONFIG_HOTPLUG_CPU
 CONFIG_PREEMPT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 CONFIG_SMP
 CONFIG_TINY_RCU
 CONFIG_TREE_PREEMPT_RCU
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt +1 -1
index f85c45e..081dece 100644
@@ -62,7 +62,7 @@ CONFIG_NO_HZ_FULL_SYSIDLE_SMALL
 	Defer until Frederic uses this.
 
 CONFIG_PREEMPT_COUNT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 
 	Redundant with CONFIG_PREEMPT, ignore.
 
Signature · 1 line
2.1.0
#3 lore raw
In reply to Josh Triplett
Quoted 5 lines · Josh Triplett
Quoted 4 lines · Pranith Kumar

PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes CONFIG_PREEMPT_RCU and uses CONFIG_TREE_PREEMPT_RCU in its place.

Quoted 8 lines
Quoted 1 line

I think it would actually make more sense to do this the other way around, if at all: drop TREE_PREEMPT_RCU in favor of PREEMPT_RCU. The instances shown here don't care about *which* preemptible RCU implementation the kernel uses, they just need to behave differently when preemptible. Let's also not assume that no new RCU implementation will ever arise superceding TREE_PREEMPT_RCU.

That is exactly what I did first and got the following changelog:

 51 files changed, 77 insertions(+), 83 deletions(-)

compared to

 8 files changed, 19 insertions(+), 25 deletions(-)

for the current one. Hence my patch opting for the latter. I will go ahead and send the other patch.

Quoted 208 lines
Quoted 208 lines
 8 files changed, 19 insertions(+), 25 deletions(-)
arch/xtensa/configs/s6105_defconfig +1 -1
index 12a492a..dab1a99 100644
@@ -35,7 +35,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 #
 # CONFIG_CLASSIC_RCU is not set
 # CONFIG_TREE_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TREE_PREEMPT_RCU=y
 # CONFIG_RCU_TRACE is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_PREEMPT_RCU_TRACE is not set
include/linux/init_task.h +1 -1
index 77fc43f..39600f4 100644
@@ -108,7 +108,7 @@ extern struct group_info init_groups;
 #else
 #define INIT_TASK_RCU_TREE_PREEMPT(tsk)
 #endif
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 #define INIT_TASK_RCU_PREEMPT(tsk)                                   \
      .rcu_read_lock_nesting = 0,                                     \
      .rcu_read_unlock_special.s = 0,                                 \
include/linux/rcupdate.h +8 -8
index a4a819f..17a15d5 100644
@@ -103,7 +103,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 
 /* Exported common interfaces */
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -140,12 +140,12 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 void call_rcu(struct rcu_head *head,
            void (*func)(struct rcu_head *head));
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* In classic RCU, call_rcu() is just call_rcu_sched(). */
 #define      call_rcu        call_rcu_sched
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /**
  * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
@@ -217,7 +217,7 @@ void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head));
 void synchronize_rcu_tasks(void);
 void rcu_barrier_tasks(void);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 void __rcu_read_lock(void);
 void __rcu_read_unlock(void);
@@ -227,12 +227,12 @@ void synchronize_rcu(void);
 /*
  * Defined as a macro as it is a very low level header included from
  * areas that don't even know about current.  This gives the rcu_read_lock()
- * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other
+ * nesting depth, but makes sense only if CONFIG_TREE_PREEMPT_RCU -- in other
  * types of kernel builds, the rcu_read_lock() nesting depth is unknowable.
  */
 #define rcu_preempt_depth() (current->rcu_read_lock_nesting)
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 static inline void __rcu_read_lock(void)
 {
@@ -254,7 +254,7 @@ static inline int rcu_preempt_depth(void)
      return 0;
 }
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* Internal to kernel */
 void rcu_init(void);
@@ -530,7 +530,7 @@ static inline int rcu_read_lock_sched_held(void)
              }                                                       \
      } while (0)
 
-#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_TREE_PREEMPT_RCU)
 static inline void rcu_preempt_sleep_check(void)
 {
      rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
include/linux/sched.h +5 -5
index 42888d7..6acaa30 100644
@@ -1269,11 +1269,11 @@ struct task_struct {
      int nr_cpus_allowed;
      cpumask_t cpus_allowed;
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
      int rcu_read_lock_nesting;
      union rcu_special rcu_read_unlock_special;
      struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
      struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
@@ -2014,12 +2014,12 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
      p->rcu_read_lock_nesting = 0;
      p->rcu_read_unlock_special.s = 0;
      p->rcu_blocked_node = NULL;
      INIT_LIST_HEAD(&p->rcu_node_entry);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
      p->rcu_tasks_holdout = false;
      INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
@@ -2752,7 +2752,7 @@ extern int __cond_resched_softirq(void);
 
 static inline void cond_resched_rcu(void)
 {
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_TREE_PREEMPT_RCU)
      rcu_read_unlock();
      cond_resched();
      rcu_read_lock();
init/Kconfig +0 -6
index 8a2b97c..27ad03c 100644
@@ -501,12 +501,6 @@ config TINY_RCU
 
 endchoice
 
-config PREEMPT_RCU
-     def_bool TREE_PREEMPT_RCU
-     help
-       This option enables preemptible-RCU code that is common between
-       TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
-
 config TASKS_RCU
      bool "Task_based RCU implementation using voluntary context switch"
      default n
kernel/rcu/update.c +2 -2
index 3ef8ba5..8848a32 100644
@@ -62,7 +62,7 @@ MODULE_ALIAS("rcupdate");
 
 module_param(rcu_expedited, int, 0);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /*
  * Preemptible RCU implementation for rcu_read_lock().
@@ -108,7 +108,7 @@ void __rcu_read_unlock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_unlock);
 
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key rcu_lock_key;
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt +1 -1
index 28db67b..4fea92d 100644
@@ -31,7 +31,7 @@ CONFIG_RCU_TORTURE_TEST
 
 CONFIG_HOTPLUG_CPU
 CONFIG_PREEMPT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 CONFIG_SMP
 CONFIG_TINY_RCU
 CONFIG_TREE_PREEMPT_RCU
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt +1 -2
index f85c45e..081dece 100644
@@ -62,7 +62,7 @@ CONFIG_NO_HZ_FULL_SYSIDLE_SMALL
      Defer until Frederic uses this.
 
 CONFIG_PREEMPT_COUNT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 
      Redundant with CONFIG_PREEMPT, ignore.
 
--

2.1.0

Signature · 1 line
Pranith
#4 lore raw
Quoted 15 lines · Pranith Kumar
Quoted 5 lines · Josh Triplett
Quoted 4 lines · Pranith Kumar

PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes CONFIG_PREEMPT_RCU and uses CONFIG_TREE_PREEMPT_RCU in its place.

Quoted 8 lines
Quoted 1 line

I think it would actually make more sense to do this the other way around, if at all: drop TREE_PREEMPT_RCU in favor of PREEMPT_RCU. The instances shown here don't care about *which* preemptible RCU implementation the kernel uses, they just need to behave differently when preemptible. Let's also not assume that no new RCU implementation will ever arise superceding TREE_PREEMPT_RCU.

Quoted 7 lines

That is exactly what I did first and got the following changelog:

 51 files changed, 77 insertions(+), 83 deletions(-)

compared to

 8 files changed, 19 insertions(+), 25 deletions(-)

Were the bulk of the files defconfig files? These need not be changed, the architecture maintainers handle them.

Thanx, Paul

Quoted 217 lines

for the current one. Hence my patch opting for the latter. I will go ahead and send the other patch.

Quoted 208 lines
Quoted 208 lines
 8 files changed, 19 insertions(+), 25 deletions(-)
arch/xtensa/configs/s6105_defconfig +1 -1
index 12a492a..dab1a99 100644
@@ -35,7 +35,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 #
 # CONFIG_CLASSIC_RCU is not set
 # CONFIG_TREE_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TREE_PREEMPT_RCU=y
 # CONFIG_RCU_TRACE is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_PREEMPT_RCU_TRACE is not set
include/linux/init_task.h +1 -1
index 77fc43f..39600f4 100644
@@ -108,7 +108,7 @@ extern struct group_info init_groups;
 #else
 #define INIT_TASK_RCU_TREE_PREEMPT(tsk)
 #endif
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 #define INIT_TASK_RCU_PREEMPT(tsk)                                   \
      .rcu_read_lock_nesting = 0,                                     \
      .rcu_read_unlock_special.s = 0,                                 \
include/linux/rcupdate.h +8 -8
index a4a819f..17a15d5 100644
@@ -103,7 +103,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 
 /* Exported common interfaces */
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -140,12 +140,12 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
 void call_rcu(struct rcu_head *head,
            void (*func)(struct rcu_head *head));
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* In classic RCU, call_rcu() is just call_rcu_sched(). */
 #define      call_rcu        call_rcu_sched
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /**
  * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
@@ -217,7 +217,7 @@ void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head));
 void synchronize_rcu_tasks(void);
 void rcu_barrier_tasks(void);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 void __rcu_read_lock(void);
 void __rcu_read_unlock(void);
@@ -227,12 +227,12 @@ void synchronize_rcu(void);
 /*
  * Defined as a macro as it is a very low level header included from
  * areas that don't even know about current.  This gives the rcu_read_lock()
- * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other
+ * nesting depth, but makes sense only if CONFIG_TREE_PREEMPT_RCU -- in other
  * types of kernel builds, the rcu_read_lock() nesting depth is unknowable.
  */
 #define rcu_preempt_depth() (current->rcu_read_lock_nesting)
 
-#else /* #ifdef CONFIG_PREEMPT_RCU */
+#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 static inline void __rcu_read_lock(void)
 {
@@ -254,7 +254,7 @@ static inline int rcu_preempt_depth(void)
      return 0;
 }
 
-#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 /* Internal to kernel */
 void rcu_init(void);
@@ -530,7 +530,7 @@ static inline int rcu_read_lock_sched_held(void)
              }                                                       \
      } while (0)
 
-#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_TREE_PREEMPT_RCU)
 static inline void rcu_preempt_sleep_check(void)
 {
      rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
include/linux/sched.h +5 -5
index 42888d7..6acaa30 100644
@@ -1269,11 +1269,11 @@ struct task_struct {
      int nr_cpus_allowed;
      cpumask_t cpus_allowed;
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
      int rcu_read_lock_nesting;
      union rcu_special rcu_read_unlock_special;
      struct list_head rcu_node_entry;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
      struct rcu_node *rcu_blocked_node;
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
@@ -2014,12 +2014,12 @@ extern void task_clear_jobctl_pending(struct task_struct *task,
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
      p->rcu_read_lock_nesting = 0;
      p->rcu_read_unlock_special.s = 0;
      p->rcu_blocked_node = NULL;
      INIT_LIST_HEAD(&p->rcu_node_entry);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 #ifdef CONFIG_TASKS_RCU
      p->rcu_tasks_holdout = false;
      INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
@@ -2752,7 +2752,7 @@ extern int __cond_resched_softirq(void);
 
 static inline void cond_resched_rcu(void)
 {
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
+#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_TREE_PREEMPT_RCU)
      rcu_read_unlock();
      cond_resched();
      rcu_read_lock();
init/Kconfig +0 -6
index 8a2b97c..27ad03c 100644
@@ -501,12 +501,6 @@ config TINY_RCU
 
 endchoice
 
-config PREEMPT_RCU
-     def_bool TREE_PREEMPT_RCU
-     help
-       This option enables preemptible-RCU code that is common between
-       TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
-
 config TASKS_RCU
      bool "Task_based RCU implementation using voluntary context switch"
      default n
kernel/rcu/update.c +2 -2
index 3ef8ba5..8848a32 100644
@@ -62,7 +62,7 @@ MODULE_ALIAS("rcupdate");
 
 module_param(rcu_expedited, int, 0);
 
-#ifdef CONFIG_PREEMPT_RCU
+#ifdef CONFIG_TREE_PREEMPT_RCU
 
 /*
  * Preemptible RCU implementation for rcu_read_lock().
@@ -108,7 +108,7 @@ void __rcu_read_unlock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_unlock);
 
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
+#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key rcu_lock_key;
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt +1 -1
index 28db67b..4fea92d 100644
@@ -31,7 +31,7 @@ CONFIG_RCU_TORTURE_TEST
 
 CONFIG_HOTPLUG_CPU
 CONFIG_PREEMPT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 CONFIG_SMP
 CONFIG_TINY_RCU
 CONFIG_TREE_PREEMPT_RCU
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt +1 -2
index f85c45e..081dece 100644
@@ -62,7 +62,7 @@ CONFIG_NO_HZ_FULL_SYSIDLE_SMALL
      Defer until Frederic uses this.
 
 CONFIG_PREEMPT_COUNT
-CONFIG_PREEMPT_RCU
+CONFIG_TREE_PREEMPT_RCU
 
      Redundant with CONFIG_PREEMPT, ignore.
 
--

2.1.0

Signature · 1 line
Pranith
#5 lore raw
Quoted 12 lines · Paul E. McKenney
Quoted 11 lines · Pranith Kumar
Quoted 7 lines · Josh Triplett

I think it would actually make more sense to do this the other way around, if at all: drop TREE_PREEMPT_RCU in favor of PREEMPT_RCU. The instances shown here don't care about *which* preemptible RCU implementation the kernel uses, they just need to behave differently when preemptible. Let's also not assume that no new RCU implementation will ever arise superceding TREE_PREEMPT_RCU.

That is exactly what I did first and got the following changelog:

Quoted 9 lines
Quoted 5 lines
 51 files changed, 77 insertions(+), 83 deletions(-)

compared to

 8 files changed, 19 insertions(+), 25 deletions(-)

Were the bulk of the files defconfig files? These need not be changed, the architecture maintainers handle them.

There are only two defconfig files in there. I removed them now. Most of them are rcutorture config files. I guess that should be fine. I am sending the patch now.

Signature · 1 line
Pranith