diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 0ef4673e351b..059b38cae384 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -112,8 +112,6 @@ static void __exit_signal(struct task_struct *tsk) | |||
112 | * We won't ever get here for the group leader, since it | 112 | * We won't ever get here for the group leader, since it |
113 | * will have been the last reference on the signal_struct. | 113 | * will have been the last reference on the signal_struct. |
114 | */ | 114 | */ |
115 | sig->utime = cputime_add(sig->utime, task_utime(tsk)); | ||
116 | sig->stime = cputime_add(sig->stime, task_stime(tsk)); | ||
117 | sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); | 115 | sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); |
118 | sig->min_flt += tsk->min_flt; | 116 | sig->min_flt += tsk->min_flt; |
119 | sig->maj_flt += tsk->maj_flt; | 117 | sig->maj_flt += tsk->maj_flt; |
@@ -122,7 +120,6 @@ static void __exit_signal(struct task_struct *tsk) | |||
122 | sig->inblock += task_io_get_inblock(tsk); | 120 | sig->inblock += task_io_get_inblock(tsk); |
123 | sig->oublock += task_io_get_oublock(tsk); | 121 | sig->oublock += task_io_get_oublock(tsk); |
124 | task_io_accounting_add(&sig->ioac, &tsk->ioac); | 122 | task_io_accounting_add(&sig->ioac, &tsk->ioac); |
125 | sig->sum_sched_runtime += tsk->se.sum_exec_runtime; | ||
126 | sig = NULL; /* Marker for below. */ | 123 | sig = NULL; /* Marker for below. */ |
127 | } | 124 | } |
128 | 125 | ||
@@ -1301,6 +1298,7 @@ static int wait_task_zombie(struct task_struct *p, int options, | |||
1301 | if (likely(!traced)) { | 1298 | if (likely(!traced)) { |
1302 | struct signal_struct *psig; | 1299 | struct signal_struct *psig; |
1303 | struct signal_struct *sig; | 1300 | struct signal_struct *sig; |
1301 | struct task_cputime cputime; | ||
1304 | 1302 | ||
1305 | /* | 1303 | /* |
1306 | * The resource counters for the group leader are in its | 1304 | * The resource counters for the group leader are in its |
@@ -1316,20 +1314,23 @@ static int wait_task_zombie(struct task_struct *p, int options, | |||
1316 | * need to protect the access to p->parent->signal fields, | 1314 | * need to protect the access to p->parent->signal fields, |
1317 | * as other threads in the parent group can be right | 1315 | * as other threads in the parent group can be right |
1318 | * here reaping other children at the same time. | 1316 | * here reaping other children at the same time. |
1317 | * | ||
1318 | * We use thread_group_cputime() to get times for the thread | ||
1319 | * group, which consolidates times for all threads in the | ||
1320 | * group including the group leader. | ||
1319 | */ | 1321 | */ |
1320 | spin_lock_irq(&p->parent->sighand->siglock); | 1322 | spin_lock_irq(&p->parent->sighand->siglock); |
1321 | psig = p->parent->signal; | 1323 | psig = p->parent->signal; |
1322 | sig = p->signal; | 1324 | sig = p->signal; |
1325 | thread_group_cputime(p, &cputime); | ||
1323 | psig->cutime = | 1326 | psig->cutime = |
1324 | cputime_add(psig->cutime, | 1327 | cputime_add(psig->cutime, |
1325 | cputime_add(p->utime, | 1328 | cputime_add(cputime.utime, |
1326 | cputime_add(sig->utime, | 1329 | sig->cutime)); |
1327 | sig->cutime))); | ||
1328 | psig->cstime = | 1330 | psig->cstime = |
1329 | cputime_add(psig->cstime, | 1331 | cputime_add(psig->cstime, |
1330 | cputime_add(p->stime, | 1332 | cputime_add(cputime.stime, |
1331 | cputime_add(sig->stime, | 1333 | sig->cstime)); |
1332 | sig->cstime))); | ||
1333 | psig->cgtime = | 1334 | psig->cgtime = |
1334 | cputime_add(psig->cgtime, | 1335 | cputime_add(psig->cgtime, |
1335 | cputime_add(p->gtime, | 1336 | cputime_add(p->gtime, |