Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 127781d1 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Remove TINY_PREEMPT_RCU

TINY_PREEMPT_RCU adds significant code and complexity, but does not
offer commensurate benefits.  People currently using TINY_PREEMPT_RCU
can get much better memory footprint with TINY_RCU, or, if they really
need preemptible RCU, they can use TREE_PREEMPT_RCU with a relatively
minor degradation in memory footprint.  Please note that this move
has been widely publicized on LKML (https://lkml.org/lkml/2012/11/12/545)
and on LWN (http://lwn.net/Articles/541037/

).

This commit therefore removes TINY_PREEMPT_RCU.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Updated to eliminate #else in rcutiny.h as suggested by Josh ]
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent efc151c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ extern void synchronize_irq(unsigned int irq);
# define synchronize_irq(irq)	barrier()
#endif

#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
#if defined(CONFIG_TINY_RCU)

static inline void rcu_nmi_enter(void)
{
+1 −1
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ void wait_rcu_gp(call_rcu_func_t crf);

#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
#include <linux/rcutree.h>
#elif defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
#elif defined(CONFIG_TINY_RCU)
#include <linux/rcutiny.h>
#else
#error "Unknown RCU implementation specified to kernel configuration"
+2 −22
Original line number Diff line number Diff line
@@ -53,16 +53,7 @@ static inline void rcu_barrier(void)
	rcu_barrier_sched();  /* Only one CPU, so only one list of callbacks! */
}

#else /* #ifdef CONFIG_TINY_RCU */

void synchronize_rcu_expedited(void);

static inline void rcu_barrier(void)
{
	wait_rcu_gp(call_rcu);
}

#endif /* #else #ifdef CONFIG_TINY_RCU */
#endif /* #ifdef CONFIG_TINY_RCU */

static inline void synchronize_rcu_bh(void)
{
@@ -97,18 +88,7 @@ static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies)
	return 0;
}

#else /* #ifdef CONFIG_TINY_RCU */

void rcu_preempt_note_context_switch(void);
int rcu_preempt_needs_cpu(void);

static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies)
{
	*delta_jiffies = ULONG_MAX;
	return rcu_preempt_needs_cpu();
}

#endif /* #else #ifdef CONFIG_TINY_RCU */
#endif /* #ifdef CONFIG_TINY_RCU */

static inline void rcu_note_context_switch(int cpu)
{
+1 −9
Original line number Diff line number Diff line
@@ -459,18 +459,10 @@ config TINY_RCU
	  is not required.  This option greatly reduces the
	  memory footprint of RCU.

config TINY_PREEMPT_RCU
	bool "Preemptible UP-only small-memory-footprint RCU"
	depends on PREEMPT && !SMP
	help
	  This option selects the RCU implementation that is designed
	  for real-time UP systems.  This option greatly reduces the
	  memory footprint of RCU.

endchoice

config PREEMPT_RCU
	def_bool ( TREE_PREEMPT_RCU || TINY_PREEMPT_RCU )
	def_bool TREE_PREEMPT_RCU
	help
	  This option enables preemptible-RCU code that is common between
	  the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
+0 −854

File changed.

Preview size limit exceeded, changes collapsed.