diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-08-04 20:43:50 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-09-07 19:27:30 -0400 |
commit | 176f8f7a52cc6d09d686f0d900abda6942a52fbb (patch) | |
tree | bd3d6a8f21e576a94d1e1812c5c5317f62d1c96d /include/linux/sched.h | |
parent | 84a8f446ffd70c2799a96268aaa4d47c22a83ff0 (diff) |
rcu: Make TASKS_RCU handle nohz_full= CPUs
Currently TASKS_RCU would ignore a CPU running a task in nohz_full=
usermode execution. There would be neither a context switch nor a
scheduling-clock interrupt to tell TASKS_RCU that the task in question
had passed through a quiescent state. The grace period would therefore
extend indefinitely. This commit therefore makes RCU's dyntick-idle
subsystem record the task_struct structure of the task that is running
in dyntick-idle mode on each CPU. The TASKS_RCU grace period can
then access this information and record a quiescent state on
behalf of any CPU running in dyntick-idle usermode.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index eaacac4ae77d..ec8b34722bcc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1274,6 +1274,7 @@ struct task_struct { | |||
1274 | unsigned long rcu_tasks_nvcsw; | 1274 | unsigned long rcu_tasks_nvcsw; |
1275 | bool rcu_tasks_holdout; | 1275 | bool rcu_tasks_holdout; |
1276 | struct list_head rcu_tasks_holdout_list; | 1276 | struct list_head rcu_tasks_holdout_list; |
1277 | int rcu_tasks_idle_cpu; | ||
1277 | #endif /* #ifdef CONFIG_TASKS_RCU */ | 1278 | #endif /* #ifdef CONFIG_TASKS_RCU */ |
1278 | 1279 | ||
1279 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1280 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
@@ -2020,6 +2021,7 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
2020 | #ifdef CONFIG_TASKS_RCU | 2021 | #ifdef CONFIG_TASKS_RCU |
2021 | p->rcu_tasks_holdout = false; | 2022 | p->rcu_tasks_holdout = false; |
2022 | INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); | 2023 | INIT_LIST_HEAD(&p->rcu_tasks_holdout_list); |
2024 | p->rcu_tasks_idle_cpu = -1; | ||
2023 | #endif /* #ifdef CONFIG_TASKS_RCU */ | 2025 | #endif /* #ifdef CONFIG_TASKS_RCU */ |
2024 | } | 2026 | } |
2025 | 2027 | ||