aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-08-27 17:58:16 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-29 09:34:39 -0400
commitdd5d19bafd90d33043a4a14b2e2d98612caa293c (patch)
treec21d547124d277f00332bdb01c75f2f4f321de8c /include
parent06e799764eb7c2e4640888d438c3524d756613e1 (diff)
rcu: Create rcutree plugins to handle hotplug CPU for multi-level trees
When offlining CPUs from a multi-level tree, there is the possibility of offlining the last CPU from a given node when there are preempted RCU read-side critical sections that started life on one of the CPUs on that node. In this case, the corresponding tasks will be enqueued via the task_struct's rcu_node_entry list_head onto one of the rcu_node's blocked_tasks[] lists. These tasks need to be moved somewhere else so that they will prevent the current grace period from ending. That somewhere is the root rcu_node. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: akpm@linux-foundation.org Cc: mathieu.desnoyers@polymtl.ca Cc: josht@linux.vnet.ibm.com Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org LKML-Reference: <20090827215816.GA30472@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/sched.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 79d4baee31b..9e7f2e8fc66 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -98,7 +98,7 @@ extern struct group_info init_groups;
98#define INIT_TASK_RCU_PREEMPT(tsk) \ 98#define INIT_TASK_RCU_PREEMPT(tsk) \
99 .rcu_read_lock_nesting = 0, \ 99 .rcu_read_lock_nesting = 0, \
100 .rcu_read_unlock_special = 0, \ 100 .rcu_read_unlock_special = 0, \
101 .rcu_blocked_cpu = -1, \ 101 .rcu_blocked_node = NULL, \
102 .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), 102 .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry),
103#else 103#else
104#define INIT_TASK_RCU_PREEMPT(tsk) 104#define INIT_TASK_RCU_PREEMPT(tsk)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index bfca26d63b1..3fe03151a8e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1208,7 +1208,7 @@ struct task_struct {
1208#ifdef CONFIG_TREE_PREEMPT_RCU 1208#ifdef CONFIG_TREE_PREEMPT_RCU
1209 int rcu_read_lock_nesting; 1209 int rcu_read_lock_nesting;
1210 char rcu_read_unlock_special; 1210 char rcu_read_unlock_special;
1211 int rcu_blocked_cpu; 1211 void *rcu_blocked_node;
1212 struct list_head rcu_node_entry; 1212 struct list_head rcu_node_entry;
1213#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 1213#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1214 1214
@@ -1735,7 +1735,7 @@ static inline void rcu_copy_process(struct task_struct *p)
1735{ 1735{
1736 p->rcu_read_lock_nesting = 0; 1736 p->rcu_read_lock_nesting = 0;
1737 p->rcu_read_unlock_special = 0; 1737 p->rcu_read_unlock_special = 0;
1738 p->rcu_blocked_cpu = -1; 1738 p->rcu_blocked_node = NULL;
1739 INIT_LIST_HEAD(&p->rcu_node_entry); 1739 INIT_LIST_HEAD(&p->rcu_node_entry);
1740} 1740}
1741 1741