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>
This commit is contained in:

committed by
Linus Torvalds

parent
7394f0f6c0
commit
49b5cf3472
@@ -1257,7 +1257,7 @@ struct task_struct {
|
||||
#if defined(CONFIG_TASK_XACCT)
|
||||
u64 acct_rss_mem1; /* accumulated rss usage */
|
||||
u64 acct_vm_mem1; /* accumulated virtual memory usage */
|
||||
cputime_t acct_stimexpd;/* stime since last update */
|
||||
cputime_t acct_timexpd; /* stime + utime since last update */
|
||||
#endif
|
||||
#ifdef CONFIG_CPUSETS
|
||||
nodemask_t mems_allowed;
|
||||
|
Reference in New Issue
Block a user