diff options
author | Jonathan Lim <jlim@sgi.com> | 2008-07-25 04:48:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:46 -0400 |
commit | 49b5cf34727a6c1be1568ab28e89a2d9a6bf51e0 (patch) | |
tree | 29505ad668bfadc67a670ad4ebc5c65823a87413 /kernel/sched.c | |
parent | 7394f0f6c0baab650ea9194cb1be847df646fb57 (diff) |
accounting: account for user time when updating memory integrals
Adapt acct_update_integrals() to include user time when calculating the time
difference. The units of acct_rss_mem1 and acct_vm_mem1 are also changed from
pages-jiffies to pages-usecs to avoid calling jiffies_to_usecs() in
xacct_add_tsk() which might overflow.
Signed-off-by: Jonathan Lim <jlim@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6acf749d3336..0047bd9b96aa 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4046,6 +4046,8 @@ void account_user_time(struct task_struct *p, cputime_t cputime) | |||
4046 | cpustat->nice = cputime64_add(cpustat->nice, tmp); | 4046 | cpustat->nice = cputime64_add(cpustat->nice, tmp); |
4047 | else | 4047 | else |
4048 | cpustat->user = cputime64_add(cpustat->user, tmp); | 4048 | cpustat->user = cputime64_add(cpustat->user, tmp); |
4049 | /* Account for user time used */ | ||
4050 | acct_update_integrals(p); | ||
4049 | } | 4051 | } |
4050 | 4052 | ||
4051 | /* | 4053 | /* |