aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2010-09-27 20:25:23 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-11-30 01:01:54 -0500
commit24278d148316d2180be6df40e06db013d8b232b8 (patch)
tree6a579d483f8f799b352e39b972a7e03cc6204fc1 /include/linux/sched.h
parentb2c0710c464ede15e1fc52fb1e7ee9ba54cea186 (diff)
rcu: priority boosting for TINY_PREEMPT_RCU
Add priority boosting, but only 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 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>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e18473f0eb78..ed1a9bc52b2f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1210,6 +1210,9 @@ struct task_struct {
1210#ifdef CONFIG_TREE_PREEMPT_RCU 1210#ifdef CONFIG_TREE_PREEMPT_RCU
1211 struct rcu_node *rcu_blocked_node; 1211 struct rcu_node *rcu_blocked_node;
1212#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 1212#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1213#ifdef CONFIG_RCU_BOOST
1214 struct rt_mutex *rcu_boost_mutex;
1215#endif /* #ifdef CONFIG_RCU_BOOST */
1213 1216
1214#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) 1217#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
1215 struct sched_info sched_info; 1218 struct sched_info sched_info;
@@ -1745,7 +1748,8 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1745#ifdef CONFIG_PREEMPT_RCU 1748#ifdef CONFIG_PREEMPT_RCU
1746 1749
1747#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ 1750#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */
1748#define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ 1751#define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */
1752#define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */
1749 1753
1750static inline void rcu_copy_process(struct task_struct *p) 1754static inline void rcu_copy_process(struct task_struct *p)
1751{ 1755{
@@ -1753,7 +1757,10 @@ static inline void rcu_copy_process(struct task_struct *p)
1753 p->rcu_read_unlock_special = 0; 1757 p->rcu_read_unlock_special = 0;
1754#ifdef CONFIG_TREE_PREEMPT_RCU 1758#ifdef CONFIG_TREE_PREEMPT_RCU
1755 p->rcu_blocked_node = NULL; 1759 p->rcu_blocked_node = NULL;
1756#endif 1760#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1761#ifdef CONFIG_RCU_BOOST
1762 p->rcu_boost_mutex = NULL;
1763#endif /* #ifdef CONFIG_RCU_BOOST */
1757 INIT_LIST_HEAD(&p->rcu_node_entry); 1764 INIT_LIST_HEAD(&p->rcu_node_entry);
1758} 1765}
1759 1766