diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-04-02 19:17:17 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-05-10 14:08:34 -0400 |
commit | bbad937983147c017c25406860287cb94da9af7c (patch) | |
tree | 57311598c360b92b189c7ec337146e4bc779c73d /kernel/rcutree.c | |
parent | 25502a6c13745f4650cc59322bd198194f55e796 (diff) |
rcu: slim down rcutiny by removing rcu_scheduler_active and friends
TINY_RCU does not need rcu_scheduler_active unless CONFIG_DEBUG_LOCK_ALLOC.
So conditionally compile rcu_scheduler_active in order to slim down
rcutiny a bit more. Also gets rid of an EXPORT_SYMBOL_GPL, which is
responsible for most of the slimming.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e33631354b69..3623f8e10220 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/cpu.h> | 46 | #include <linux/cpu.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/time.h> | 48 | #include <linux/time.h> |
49 | #include <linux/kernel_stat.h> | ||
49 | 50 | ||
50 | #include "rcutree.h" | 51 | #include "rcutree.h" |
51 | 52 | ||
@@ -80,6 +81,9 @@ DEFINE_PER_CPU(struct rcu_data, rcu_sched_data); | |||
80 | struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state); | 81 | struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state); |
81 | DEFINE_PER_CPU(struct rcu_data, rcu_bh_data); | 82 | DEFINE_PER_CPU(struct rcu_data, rcu_bh_data); |
82 | 83 | ||
84 | int rcu_scheduler_active __read_mostly; | ||
85 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); | ||
86 | |||
83 | /* | 87 | /* |
84 | * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s | 88 | * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s |
85 | * permit this function to be invoked without holding the root rcu_node | 89 | * permit this function to be invoked without holding the root rcu_node |
@@ -1784,6 +1788,21 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self, | |||
1784 | } | 1788 | } |
1785 | 1789 | ||
1786 | /* | 1790 | /* |
1791 | * This function is invoked towards the end of the scheduler's initialization | ||
1792 | * process. Before this is called, the idle task might contain | ||
1793 | * RCU read-side critical sections (during which time, this idle | ||
1794 | * task is booting the system). After this function is called, the | ||
1795 | * idle tasks are prohibited from containing RCU read-side critical | ||
1796 | * sections. This function also enables RCU lockdep checking. | ||
1797 | */ | ||
1798 | void rcu_scheduler_starting(void) | ||
1799 | { | ||
1800 | WARN_ON(num_online_cpus() != 1); | ||
1801 | WARN_ON(nr_context_switches() > 0); | ||
1802 | rcu_scheduler_active = 1; | ||
1803 | } | ||
1804 | |||
1805 | /* | ||
1787 | * Compute the per-level fanout, either using the exact fanout specified | 1806 | * Compute the per-level fanout, either using the exact fanout specified |
1788 | * or balancing the tree, depending on CONFIG_RCU_FANOUT_EXACT. | 1807 | * or balancing the tree, depending on CONFIG_RCU_FANOUT_EXACT. |
1789 | */ | 1808 | */ |