diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5c2c885ee52b..42888d715fb1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1212,6 +1212,13 @@ struct sched_dl_entity { | |||
1212 | struct hrtimer dl_timer; | 1212 | struct hrtimer dl_timer; |
1213 | }; | 1213 | }; |
1214 | 1214 | ||
1215 | union rcu_special { | ||
1216 | struct { | ||
1217 | bool blocked; | ||
1218 | bool need_qs; | ||
1219 | } b; | ||
1220 | short s; | ||
1221 | }; | ||
1215 | struct rcu_node; | 1222 | struct rcu_node; |
1216 | 1223 | ||
1217 | enum perf_event_task_context { | 1224 | enum perf_event_task_context { |
@@ -1264,12 +1271,18 @@ struct task_struct { | |||
1264 | 1271 | ||
1265 | #ifdef CONFIG_PREEMPT_RCU | 1272 | #ifdef CONFIG_PREEMPT_RCU |
1266 | int rcu_read_lock_nesting; | 1273 | int rcu_read_lock_nesting; |
1267 | char rcu_read_unlock_special; | 1274 | union rcu_special rcu_read_unlock_special; |
1268 | struct list_head rcu_node_entry; | 1275 | struct list_head rcu_node_entry; |
1269 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | 1276 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ |
1270 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1277 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1271 | struct rcu_node *rcu_blocked_node; | 1278 | struct rcu_node *rcu_blocked_node; |
1272 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1279 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1280 | #ifdef CONFIG_TASKS_RCU | ||
1281 | unsigned long rcu_tasks_nvcsw; | ||
1282 | bool rcu_tasks_holdout; | ||
1283 | struct list_head rcu_tasks_holdout_list; | ||
1284 | int rcu_tasks_idle_cpu; | ||
1285 | #endif /* #ifdef CONFIG_TASKS_RCU */ | ||
1273 | 1286 | ||
1274 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1287 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
1275 | struct sched_info sched_info; | 1288 | struct sched_info sched_info; |
@@ -1999,29 +2012,21 @@ extern void task_clear_jobctl_trapping(struct task_struct *task); | |||
1999 | extern void task_clear_jobctl_pending(struct task_struct *task, | 2012 | extern void task_clear_jobctl_pending(struct task_struct *task, |
2000 | unsigned int mask); | 2013 | unsigned int mask); |
2001 | 2014 | ||
2002 | #ifdef CONFIG_PREEMPT_RCU | ||
2003 | |||
2004 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | ||
2005 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | ||
2006 | |||
2007 | static inline void rcu_copy_process(struct task_struct *p) | 2015 | static inline void rcu_copy_process(struct task_struct *p) |
2008 | { | 2016 | { |
2017 | #ifdef CONFIG_PREEMPT_RCU | ||
2009 | p->rcu_read_lock_nesting = 0; | 2018 | p->rcu_read_lock_nesting = 0; |
2010 | p->rcu_read_unlock_special = 0; | 2019 | p->rcu_read_unlock_special.s = 0; |
2011 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
2012 | p->rcu_blocked_node = NULL; | 2020 | p->rcu_blocked_node = NULL; |
2013 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | ||
2014 | INIT_LIST_HEAD(&p->rcu_node_entry); | 2021 | INIT_LIST_HEAD(&p->rcu_node_entry); |
2022 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
2023 | #ifdef CONFIG_TASKS_RCU | ||
2024 | p->rcu_tasks_holdout = false; | ||
2025 | INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); | ||
2026 | p->rcu_tasks_idle_cpu = -1; | ||
2027 | #endif /* #ifdef CONFIG_TASKS_RCU */ | ||
2015 | } | 2028 | } |
2016 | 2029 | ||
2017 | #else | ||
2018 | |||
2019 | static inline void rcu_copy_process(struct task_struct *p) | ||
2020 | { | ||
2021 | } | ||
2022 | |||
2023 | #endif | ||
2024 | |||
2025 | static inline void tsk_restore_flags(struct task_struct *task, | 2030 | static inline void tsk_restore_flags(struct task_struct *task, |
2026 | unsigned long orig_flags, unsigned long flags) | 2031 | unsigned long orig_flags, unsigned long flags) |
2027 | { | 2032 | { |