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 /kernel/rcu/update.c | |
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 'kernel/rcu/update.c')
-rw-r--r-- | kernel/rcu/update.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index e1d71741958f..2658de4a5975 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c | |||
@@ -463,7 +463,9 @@ static void check_holdout_task(struct task_struct *t, | |||
463 | { | 463 | { |
464 | if (!ACCESS_ONCE(t->rcu_tasks_holdout) || | 464 | if (!ACCESS_ONCE(t->rcu_tasks_holdout) || |
465 | t->rcu_tasks_nvcsw != ACCESS_ONCE(t->nvcsw) || | 465 | t->rcu_tasks_nvcsw != ACCESS_ONCE(t->nvcsw) || |
466 | !ACCESS_ONCE(t->on_rq)) { | 466 | !ACCESS_ONCE(t->on_rq) || |
467 | (IS_ENABLED(CONFIG_NO_HZ_FULL) && | ||
468 | !is_idle_task(t) && t->rcu_tasks_idle_cpu >= 0)) { | ||
467 | ACCESS_ONCE(t->rcu_tasks_holdout) = false; | 469 | ACCESS_ONCE(t->rcu_tasks_holdout) = false; |
468 | list_del_rcu(&t->rcu_tasks_holdout_list); | 470 | list_del_rcu(&t->rcu_tasks_holdout_list); |
469 | put_task_struct(t); | 471 | put_task_struct(t); |