Skip to content

Commit 28f6569

Browse files
pranithpaulmck
authored andcommitted
rcu: Remove redundant TREE_PREEMPT_RCU config option
PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after TINY_PREEMPT_RCU has been removed. This patch removes TREE_PREEMPT_RCU and uses PREEMPT_RCU config option in its place. Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent 21871d7 commit 28f6569

48 files changed

Lines changed: 74 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/RCU/rcu.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ o How can the updater tell when a grace period has completed
3636
executed in user mode, or executed in the idle loop, we can
3737
safely free up that item.
3838

39-
Preemptible variants of RCU (CONFIG_TREE_PREEMPT_RCU) get the
39+
Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
4040
same effect, but require that the readers manipulate CPU-local
4141
counters. These counters allow limited types of blocking within
4242
RCU read-side critical sections. SRCU also uses CPU-local
@@ -81,7 +81,7 @@ o I hear that RCU is patented? What is with that?
8181
o I hear that RCU needs work in order to support realtime kernels?
8282

8383
This work is largely completed. Realtime-friendly RCU can be
84-
enabled via the CONFIG_TREE_PREEMPT_RCU kernel configuration
84+
enabled via the CONFIG_PREEMPT_RCU kernel configuration
8585
parameter. However, work is in progress for enabling priority
8686
boosting of preempted RCU read-side critical sections. This is
8787
needed if you have CPU-bound realtime threads.

‎Documentation/RCU/stallwarn.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This message indicates that CPU 5 detected that it was causing a stall,
7777
and that the stall was affecting RCU-sched. This message will normally be
7878
followed by a stack dump of the offending CPU. On TREE_RCU kernel builds,
7979
RCU and RCU-sched are implemented by the same underlying mechanism,
80-
while on TREE_PREEMPT_RCU kernel builds, RCU is instead implemented
80+
while on PREEMPT_RCU kernel builds, RCU is instead implemented
8181
by rcu_preempt_state.
8282

8383
On the other hand, if the offending CPU fails to print out a stall-warning
@@ -89,7 +89,7 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { 3 5 } (detected by 2, 2502 j
8989
This message indicates that CPU 2 detected that CPUs 3 and 5 were both
9090
causing stalls, and that the stall was affecting RCU-bh. This message
9191
will normally be followed by stack dumps for each CPU. Please note that
92-
TREE_PREEMPT_RCU builds can be stalled by tasks as well as by CPUs,
92+
PREEMPT_RCU builds can be stalled by tasks as well as by CPUs,
9393
and that the tasks will be indicated by PID, for example, "P3421".
9494
It is even possible for a rcu_preempt_state stall to be caused by both
9595
CPUs -and- tasks, in which case the offending CPUs and tasks will all
@@ -205,10 +205,10 @@ o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
205205
o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
206206
is running at a higher priority than the RCU softirq threads.
207207
This will prevent RCU callbacks from ever being invoked,
208-
and in a CONFIG_TREE_PREEMPT_RCU kernel will further prevent
208+
and in a CONFIG_PREEMPT_RCU kernel will further prevent
209209
RCU grace periods from ever completing. Either way, the
210210
system will eventually run out of memory and hang. In the
211-
CONFIG_TREE_PREEMPT_RCU case, you might see stall-warning
211+
CONFIG_PREEMPT_RCU case, you might see stall-warning
212212
messages.
213213

214214
o A hardware or software issue shuts off the scheduler-clock

‎Documentation/RCU/trace.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following sections describe the debugfs files and formats, first
88
for rcutree and next for rcutiny.
99

1010

11-
CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
11+
CONFIG_TREE_RCU and CONFIG_PREEMPT_RCU debugfs Files and Formats
1212

1313
These implementations of RCU provide several debugfs directories under the
1414
top-level directory "rcu":
@@ -18,7 +18,7 @@ rcu/rcu_preempt
1818
rcu/rcu_sched
1919

2020
Each directory contains files for the corresponding flavor of RCU.
21-
Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU.
21+
Note that rcu/rcu_preempt is only present for CONFIG_PREEMPT_RCU.
2222
For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor,
2323
so that activity for both appears in rcu/rcu_sched.
2424

‎Documentation/RCU/whatisRCU.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ rcu_read_lock()
137137
Used by a reader to inform the reclaimer that the reader is
138138
entering an RCU read-side critical section. It is illegal
139139
to block while in an RCU read-side critical section, though
140-
kernels built with CONFIG_TREE_PREEMPT_RCU can preempt RCU
140+
kernels built with CONFIG_PREEMPT_RCU can preempt RCU
141141
read-side critical sections. Any RCU-protected data structure
142142
accessed during an RCU read-side critical section is guaranteed to
143143
remain unreclaimed for the full duration of that critical section.

‎include/linux/init_task.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extern struct group_info init_groups;
102102
#define INIT_IDS
103103
#endif
104104

105-
#ifdef CONFIG_TREE_PREEMPT_RCU
105+
#ifdef CONFIG_PREEMPT_RCU
106106
#define INIT_TASK_RCU_TREE_PREEMPT() \
107107
.rcu_blocked_node = NULL,
108108
#else

‎include/linux/rcupdate.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum rcutorture_type {
5757
INVALID_RCU_FLAVOR
5858
};
5959

60-
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
60+
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
6161
void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
6262
unsigned long *gpnum, unsigned long *completed);
6363
void rcutorture_record_test_transition(void);
@@ -365,7 +365,7 @@ typedef void call_rcu_func_t(struct rcu_head *head,
365365
void (*func)(struct rcu_head *head));
366366
void wait_rcu_gp(call_rcu_func_t crf);
367367

368-
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
368+
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
369369
#include <linux/rcutree.h>
370370
#elif defined(CONFIG_TINY_RCU)
371371
#include <linux/rcutiny.h>
@@ -852,7 +852,7 @@ static inline void rcu_preempt_sleep_check(void)
852852
*
853853
* In non-preemptible RCU implementations (TREE_RCU and TINY_RCU),
854854
* it is illegal to block while in an RCU read-side critical section.
855-
* In preemptible RCU implementations (TREE_PREEMPT_RCU) in CONFIG_PREEMPT
855+
* In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPT
856856
* kernel builds, RCU read-side critical sections may be preempted,
857857
* but explicit blocking is illegal. Finally, in preemptible RCU
858858
* implementations in real-time (with -rt patchset) kernel builds, RCU

‎include/linux/sched.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,9 +1278,9 @@ struct task_struct {
12781278
union rcu_special rcu_read_unlock_special;
12791279
struct list_head rcu_node_entry;
12801280
#endif /* #ifdef CONFIG_PREEMPT_RCU */
1281-
#ifdef CONFIG_TREE_PREEMPT_RCU
1281+
#ifdef CONFIG_PREEMPT_RCU
12821282
struct rcu_node *rcu_blocked_node;
1283-
#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1283+
#endif /* #ifdef CONFIG_PREEMPT_RCU */
12841284
#ifdef CONFIG_TASKS_RCU
12851285
unsigned long rcu_tasks_nvcsw;
12861286
bool rcu_tasks_holdout;

‎include/trace/events/rcu.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ TRACE_EVENT(rcu_utilization,
3636

3737
#ifdef CONFIG_RCU_TRACE
3838

39-
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
39+
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
4040

4141
/*
4242
* Tracepoint for grace-period events. Takes a string identifying the
@@ -345,7 +345,7 @@ TRACE_EVENT(rcu_fqs,
345345
__entry->cpu, __entry->qsevent)
346346
);
347347

348-
#endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */
348+
#endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) */
349349

350350
/*
351351
* Tracepoint for dyntick-idle entry/exit events. These take a string

‎init/Kconfig‎

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ config TREE_RCU
477477
thousands of CPUs. It also scales down nicely to
478478
smaller systems.
479479

480-
config TREE_PREEMPT_RCU
480+
config PREEMPT_RCU
481481
bool "Preemptible tree-based hierarchical RCU"
482482
depends on PREEMPT
483483
select IRQ_WORK
@@ -501,12 +501,6 @@ config TINY_RCU
501501

502502
endchoice
503503

504-
config PREEMPT_RCU
505-
def_bool TREE_PREEMPT_RCU
506-
help
507-
This option enables preemptible-RCU code that is common between
508-
TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
509-
510504
config TASKS_RCU
511505
bool "Task_based RCU implementation using voluntary context switch"
512506
default n
@@ -518,7 +512,7 @@ config TASKS_RCU
518512
If unsure, say N.
519513

520514
config RCU_STALL_COMMON
521-
def_bool ( TREE_RCU || TREE_PREEMPT_RCU || RCU_TRACE )
515+
def_bool ( TREE_RCU || PREEMPT_RCU || RCU_TRACE )
522516
help
523517
This option enables RCU CPU stall code that is common between
524518
the TINY and TREE variants of RCU. The purpose is to allow
@@ -576,7 +570,7 @@ config RCU_FANOUT
576570
int "Tree-based hierarchical RCU fanout value"
577571
range 2 64 if 64BIT
578572
range 2 32 if !64BIT
579-
depends on TREE_RCU || TREE_PREEMPT_RCU
573+
depends on TREE_RCU || PREEMPT_RCU
580574
default 64 if 64BIT
581575
default 32 if !64BIT
582576
help
@@ -596,7 +590,7 @@ config RCU_FANOUT_LEAF
596590
int "Tree-based hierarchical RCU leaf-level fanout value"
597591
range 2 RCU_FANOUT if 64BIT
598592
range 2 RCU_FANOUT if !64BIT
599-
depends on TREE_RCU || TREE_PREEMPT_RCU
593+
depends on TREE_RCU || PREEMPT_RCU
600594
default 16
601595
help
602596
This option controls the leaf-level fanout of hierarchical
@@ -621,7 +615,7 @@ config RCU_FANOUT_LEAF
621615

622616
config RCU_FANOUT_EXACT
623617
bool "Disable tree-based hierarchical RCU auto-balancing"
624-
depends on TREE_RCU || TREE_PREEMPT_RCU
618+
depends on TREE_RCU || PREEMPT_RCU
625619
default n
626620
help
627621
This option forces use of the exact RCU_FANOUT value specified,
@@ -652,11 +646,11 @@ config RCU_FAST_NO_HZ
652646
Say N if you are unsure.
653647

654648
config TREE_RCU_TRACE
655-
def_bool RCU_TRACE && ( TREE_RCU || TREE_PREEMPT_RCU )
649+
def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU )
656650
select DEBUG_FS
657651
help
658652
This option provides tracing for the TREE_RCU and
659-
TREE_PREEMPT_RCU implementations, permitting Makefile to
653+
PREEMPT_RCU implementations, permitting Makefile to
660654
trivially select kernel/rcutree_trace.c.
661655

662656
config RCU_BOOST
@@ -716,7 +710,7 @@ config RCU_BOOST_DELAY
716710

717711
config RCU_NOCB_CPU
718712
bool "Offload RCU callback processing from boot-selected CPUs"
719-
depends on TREE_RCU || TREE_PREEMPT_RCU
713+
depends on TREE_RCU || PREEMPT_RCU
720714
default n
721715
help
722716
Use this option to reduce OS jitter for aggressive HPC or

‎kernel/rcu/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
obj-y += update.o srcu.o
22
obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
33
obj-$(CONFIG_TREE_RCU) += tree.o
4-
obj-$(CONFIG_TREE_PREEMPT_RCU) += tree.o
4+
obj-$(CONFIG_PREEMPT_RCU) += tree.o
55
obj-$(CONFIG_TREE_RCU_TRACE) += tree_trace.o
66
obj-$(CONFIG_TINY_RCU) += tiny.o

0 commit comments

Comments
 (0)