Commit 01b1d88b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

rcu: Use CONFIG_PREEMPTION



CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by
CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same
functionality which today depends on CONFIG_PREEMPT.

Switch the conditionals in RCU to use CONFIG_PREEMPTION.

That's the first step towards RCU on RT. The further tweaks are work in
progress. This neither touches the selftest bits which need a closer look
by Paul.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20190726212124.210156346@linutronix.de


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c1a280b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ config STATIC_KEYS_SELFTEST
config OPTPROBES
	def_bool y
	depends on KPROBES && HAVE_OPTPROBES
	select TASKS_RCU if PREEMPT
	select TASKS_RCU if PREEMPTION

config KPROBES_ON_FTRACE
	def_bool y
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ do { \
 *
 * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU),
 * it is illegal to block while in an RCU read-side critical section.
 * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPT
 * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPTION
 * kernel builds, RCU read-side critical sections may be preempted,
 * but explicit blocking is illegal.  Finally, in preemptible RCU
 * implementations in real-time (with -rt patchset) kernel builds, RCU
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ void rcu_scheduler_starting(void);
extern int rcu_scheduler_active __read_mostly;
void rcu_end_inkernel_boot(void);
bool rcu_is_watching(void);
#ifndef CONFIG_PREEMPT
#ifndef CONFIG_PREEMPTION
void rcu_all_qs(void);
#endif

+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ void _torture_stop_kthread(char *m, struct task_struct **tp);
#define torture_stop_kthread(n, tp) \
	_torture_stop_kthread("Stopping " #n " task", &(tp))

#ifdef CONFIG_PREEMPT
#ifdef CONFIG_PREEMPTION
#define torture_preempt_schedule() preempt_schedule()
#else
#define torture_preempt_schedule()
+4 −4
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ menu "RCU Subsystem"

config TREE_RCU
	bool
	default y if !PREEMPT && SMP
	default y if !PREEMPTION && SMP
	help
	  This option selects the RCU implementation that is
	  designed for very large SMP system with hundreds or
@@ -16,7 +16,7 @@ config TREE_RCU

config PREEMPT_RCU
	bool
	default y if PREEMPT
	default y if PREEMPTION
	help
	  This option selects the RCU implementation that is
	  designed for very large SMP systems with hundreds or
@@ -28,7 +28,7 @@ config PREEMPT_RCU

config TINY_RCU
	bool
	default y if !PREEMPT && !SMP
	default y if !PREEMPTION && !SMP
	help
	  This option selects the RCU implementation that is
	  designed for UP systems from which real-time response
@@ -70,7 +70,7 @@ config TREE_SRCU
	  This option selects the full-fledged version of SRCU.

config TASKS_RCU
	def_bool PREEMPT
	def_bool PREEMPTION
	select SRCU
	help
	  This option enables a task-based RCU implementation that uses
Loading