diff options
| author | Tejun Heo <tj@kernel.org> | 2012-04-01 15:30:01 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2012-04-01 15:55:00 -0400 |
| commit | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (patch) | |
| tree | 3ba9c94ec346275fb44c4f0d1cd2537cdff8d811 /kernel/hung_task.c | |
| parent | a5567932fc926739e29e98487128080f40c61710 (diff) | |
| parent | 48ddbe194623ae089cc0576e60363f2d2e85662a (diff) | |
Merge branch 'for-3.5' of ../cgroup into block/for-3.5/core-merged
cgroup/for-3.5 contains the following changes which blk-cgroup needs
to proceed with the on-going cleanup.
* Dynamic addition and removal of cftypes to make config/stat file
handling modular for policies.
* cgroup removal update to not wait for css references to drain to fix
blkcg removal hang caused by cfq caching cfqgs.
Pull in cgroup/for-3.5 into block/for-3.5/core. This causes the
following conflicts in block/blk-cgroup.c.
* 761b3ef50e "cgroup: remove cgroup_subsys argument from callbacks"
conflicts with blkiocg_pre_destroy() addition and blkiocg_attach()
removal. Resolved by removing @subsys from all subsys methods.
* 676f7c8f84 "cgroup: relocate cftype and cgroup_subsys definitions in
controllers" conflicts with ->pre_destroy() and ->attach() updates
and removal of modular config. Resolved by dropping forward
declarations of the methods and applying updates to the relocated
blkio_subsys.
* 4baf6e3325 "cgroup: convert all non-memcg controllers to the new
cftype interface" builds upon the previous item. Resolved by adding
->base_cftypes to the relocated blkio_subsys.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/hung_task.c')
| -rw-r--r-- | kernel/hung_task.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 2e48ec0c2e91..c21449f85a2a 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
| @@ -119,15 +119,20 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) | |||
| 119 | * For preemptible RCU it is sufficient to call rcu_read_unlock in order | 119 | * For preemptible RCU it is sufficient to call rcu_read_unlock in order |
| 120 | * to exit the grace period. For classic RCU, a reschedule is required. | 120 | * to exit the grace period. For classic RCU, a reschedule is required. |
| 121 | */ | 121 | */ |
| 122 | static void rcu_lock_break(struct task_struct *g, struct task_struct *t) | 122 | static bool rcu_lock_break(struct task_struct *g, struct task_struct *t) |
| 123 | { | 123 | { |
| 124 | bool can_cont; | ||
| 125 | |||
| 124 | get_task_struct(g); | 126 | get_task_struct(g); |
| 125 | get_task_struct(t); | 127 | get_task_struct(t); |
| 126 | rcu_read_unlock(); | 128 | rcu_read_unlock(); |
| 127 | cond_resched(); | 129 | cond_resched(); |
| 128 | rcu_read_lock(); | 130 | rcu_read_lock(); |
| 131 | can_cont = pid_alive(g) && pid_alive(t); | ||
| 129 | put_task_struct(t); | 132 | put_task_struct(t); |
| 130 | put_task_struct(g); | 133 | put_task_struct(g); |
| 134 | |||
| 135 | return can_cont; | ||
| 131 | } | 136 | } |
| 132 | 137 | ||
| 133 | /* | 138 | /* |
| @@ -154,9 +159,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) | |||
| 154 | goto unlock; | 159 | goto unlock; |
| 155 | if (!--batch_count) { | 160 | if (!--batch_count) { |
| 156 | batch_count = HUNG_TASK_BATCHING; | 161 | batch_count = HUNG_TASK_BATCHING; |
| 157 | rcu_lock_break(g, t); | 162 | if (!rcu_lock_break(g, t)) |
| 158 | /* Exit if t or g was unhashed during refresh. */ | ||
| 159 | if (t->state == TASK_DEAD || g->state == TASK_DEAD) | ||
| 160 | goto unlock; | 163 | goto unlock; |
| 161 | } | 164 | } |
| 162 | /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ | 165 | /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ |
