aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-06-17 19:27:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:52 -0400
commit77d1ef79568b337f599b75795acc8f78a87ba9ba (patch)
tree4fc0f622c6e064e76e6fd28981c3375ee3d153a9 /kernel
parente49612544c695117644af48bb4625264a3d2918f (diff)
wait_task_zombie: do not use thread_group_cputime()
There is no reason for thread_group_cputime() in wait_task_zombie(), there must be no other threads. This call was previously needed to collect the per-cpu data which we do not have any longer. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Roland McGrath <roland@redhat.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Vitaly Mayatskikh <vmayatsk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 826e1dc8168b..94a9992e6fd9 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1191,7 +1191,6 @@ static int wait_task_zombie(struct task_struct *p, int options,
1191 if (likely(!traced)) { 1191 if (likely(!traced)) {
1192 struct signal_struct *psig; 1192 struct signal_struct *psig;
1193 struct signal_struct *sig; 1193 struct signal_struct *sig;
1194 struct task_cputime cputime;
1195 1194
1196 /* 1195 /*
1197 * The resource counters for the group leader are in its 1196 * The resource counters for the group leader are in its
@@ -1207,23 +1206,20 @@ static int wait_task_zombie(struct task_struct *p, int options,
1207 * need to protect the access to parent->signal fields, 1206 * need to protect the access to parent->signal fields,
1208 * as other threads in the parent group can be right 1207 * as other threads in the parent group can be right
1209 * here reaping other children at the same time. 1208 * here reaping other children at the same time.
1210 *
1211 * We use thread_group_cputime() to get times for the thread
1212 * group, which consolidates times for all threads in the
1213 * group including the group leader.
1214 */ 1209 */
1215 thread_group_cputime(p, &cputime);
1216 spin_lock_irq(&p->real_parent->sighand->siglock); 1210 spin_lock_irq(&p->real_parent->sighand->siglock);
1217 psig = p->real_parent->signal; 1211 psig = p->real_parent->signal;
1218 sig = p->signal; 1212 sig = p->signal;
1219 psig->cutime = 1213 psig->cutime =
1220 cputime_add(psig->cutime, 1214 cputime_add(psig->cutime,
1221 cputime_add(cputime.utime, 1215 cputime_add(p->utime,
1222 sig->cutime)); 1216 cputime_add(sig->utime,
1217 sig->cutime)));
1223 psig->cstime = 1218 psig->cstime =
1224 cputime_add(psig->cstime, 1219 cputime_add(psig->cstime,
1225 cputime_add(cputime.stime, 1220 cputime_add(p->stime,
1226 sig->cstime)); 1221 cputime_add(sig->stime,
1222 sig->cstime)));
1227 psig->cgtime = 1223 psig->cgtime =
1228 cputime_add(psig->cgtime, 1224 cputime_add(psig->cgtime,
1229 cputime_add(p->gtime, 1225 cputime_add(p->gtime,