On Thu, 2010-11-25 at 14:21 +0100, Oleg Nesterov wrote: > On 11/25, Michael Holzheu wrote: > But in fact this reminds we should cleanup this code somehow. > By the time we call thread_group_times() there are no other > threads. Couldn't we just replace thread_group_times() with the following: --- a/kernel/exit.c +++ b/kernel/exit.c @@ -101,12 +101,13 @@ static void __account_cdata(struct task_ * group, which consolidates times for all threads in the * group including the group leader. */ - thread_group_times(p, &tgutime, &tgstime); pcd = &p->real_parent->signal->cdata_wait; tcd = &p->signal->cdata_threads; cd = &p->signal->cdata_wait; spin_lock_irqsave(&p->real_parent->sighand->siglock, flags); + tgutime = cputime_add(tcd->utime, p->utime); + tgstime = cputime_add(tcd->stime, p->stime); pcd->utime = cputime_add(pcd->utime, cputime_add(tgutime, Then we can move the __account_cdata() invocation down to the second group_dead check. Michael -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html