Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132120
b: refs/heads/master
c: 6d5b5ac
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed Mar 9, 2009
1 parent fa3cd19 commit 3af617b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a203f3b089be4410fe065dd9927027eade94557
refs/heads/master: 6d5b5acca9e566515ef3f1ed617e7295c4f94345
6 changes: 5 additions & 1 deletion trunk/kernel/tsacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,23 @@ void acct_update_integrals(struct task_struct *tsk)
if (likely(tsk->mm)) {
cputime_t time, dtime;
struct timeval value;
unsigned long flags;
u64 delta;

local_irq_save(flags);
time = tsk->stime + tsk->utime;
dtime = cputime_sub(time, tsk->acct_timexpd);
jiffies_to_timeval(cputime_to_jiffies(dtime), &value);
delta = value.tv_sec;
delta = delta * USEC_PER_SEC + value.tv_usec;

if (delta == 0)
return;
goto out;
tsk->acct_timexpd = time;
tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm);
tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
out:
local_irq_restore(flags);
}
}

Expand Down

0 comments on commit 3af617b

Please sign in to comment.