summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-02-07 15:47:15 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-06 02:16:55 -0400
commit27f4d28057adf98750cf863c40baefb12f5b6d21 (patch)
treea66584d2cb68cebda327313f78b8f4eb602ed4ef /kernel/rcutree.h
parenta26ac2455ffcf3be5c6ef92bc6df7182700f2114 (diff)
rcu: priority boosting for TREE_PREEMPT_RCU
Add priority boosting for TREE_PREEMPT_RCU, similar to that for TINY_PREEMPT_RCU. This is enabled by the default-off RCU_BOOST kernel parameter. The priority to which to boost preempted RCU readers is controlled by the RCU_BOOST_PRIO kernel parameter (defaulting to real-time priority 1) and the time to wait before boosting the readers who are blocking a given grace period is controlled by the RCU_BOOST_DELAY kernel parameter (defaulting to 500 milliseconds). Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.h')
-rw-r--r--kernel/rcutree.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index c0213802d164..8db0cdc7f450 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -135,6 +135,24 @@ struct rcu_node {
135 /* if there is no such task. If there */ 135 /* if there is no such task. If there */
136 /* is no current expedited grace period, */ 136 /* is no current expedited grace period, */
137 /* then there can cannot be any such task. */ 137 /* then there can cannot be any such task. */
138#ifdef CONFIG_RCU_BOOST
139 struct list_head *boost_tasks;
140 /* Pointer to first task that needs to be */
141 /* priority boosted, or NULL if no priority */
142 /* boosting is needed for this rcu_node */
143 /* structure. If there are no tasks */
144 /* queued on this rcu_node structure that */
145 /* are blocking the current grace period, */
146 /* there can be no such task. */
147 unsigned long boost_time;
148 /* When to start boosting (jiffies). */
149 struct task_struct *boost_kthread_task;
150 /* kthread that takes care of priority */
151 /* boosting for this rcu_node structure. */
152 wait_queue_head_t boost_wq;
153 /* Wait queue on which to park the boost */
154 /* kthread. */
155#endif /* #ifdef CONFIG_RCU_BOOST */
138 struct task_struct *node_kthread_task; 156 struct task_struct *node_kthread_task;
139 /* kthread that takes care of this rcu_node */ 157 /* kthread that takes care of this rcu_node */
140 /* structure, for example, awakening the */ 158 /* structure, for example, awakening the */
@@ -365,7 +383,7 @@ DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
365static void rcu_bootup_announce(void); 383static void rcu_bootup_announce(void);
366long rcu_batches_completed(void); 384long rcu_batches_completed(void);
367static void rcu_preempt_note_context_switch(int cpu); 385static void rcu_preempt_note_context_switch(int cpu);
368static int rcu_preempted_readers(struct rcu_node *rnp); 386static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp);
369#ifdef CONFIG_HOTPLUG_CPU 387#ifdef CONFIG_HOTPLUG_CPU
370static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, 388static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp,
371 unsigned long flags); 389 unsigned long flags);
@@ -392,5 +410,16 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
392static void rcu_preempt_send_cbs_to_online(void); 410static void rcu_preempt_send_cbs_to_online(void);
393static void __init __rcu_init_preempt(void); 411static void __init __rcu_init_preempt(void);
394static void rcu_needs_cpu_flush(void); 412static void rcu_needs_cpu_flush(void);
413static void __init rcu_init_boost_waitqueue(struct rcu_node *rnp);
414static void rcu_initiate_boost(struct rcu_node *rnp);
415static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp,
416 cpumask_var_t cm);
417static void rcu_preempt_boost_start_gp(struct rcu_node *rnp);
418static int __cpuinit rcu_spawn_one_boost_kthread(struct rcu_state *rsp,
419 struct rcu_node *rnp,
420 int rnp_index);
421#ifdef CONFIG_HOTPLUG_CPU
422static void rcu_stop_boost_kthread(struct rcu_node *rnp);
423#endif /* #ifdef CONFIG_HOTPLUG_CPU */
395 424
396#endif /* #ifndef RCU_TREE_NONCORE */ 425#endif /* #ifndef RCU_TREE_NONCORE */