Skip to content

Commit

Permalink
rcu: Remove TINY_PREEMPT_RCU
Browse files Browse the repository at this point in the history
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: Paul E. McKenney <[email protected]>
[ paulmck: Updated to eliminate #else in rcutiny.h as suggested by Josh ]
Reviewed-by: Josh Triplett <[email protected]>
  • Loading branch information
paulmck committed Jun 10, 2013
1 parent efc151c commit 127781d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 887 deletions.
2 changes: 1 addition & 1 deletion include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 2 additions & 22 deletions include/linux/rcutiny.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
10 changes: 1 addition & 9 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 127781d

Please sign in to comment.