[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-s390
Subject: Re: [patch 3/4] taskstats: Introduce cdata_acct for complete
From: Michael Holzheu <holzheu () linux ! vnet ! ibm ! com>
Date: 2010-11-25 17:45:58
Message-ID: 1290707158.1941.79.camel () holzheu-laptop
[Download RAW message or body]
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic