aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/acct.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/acct.c')
-rw-r--r--kernel/acct.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index f4330acead46..0aad5ca36a81 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -602,33 +602,3 @@ void acct_process(void)
602 do_acct_process(file); 602 do_acct_process(file);
603 fput(file); 603 fput(file);
604} 604}
605
606
607/**
608 * acct_update_integrals - update mm integral fields in task_struct
609 * @tsk: task_struct for accounting
610 */
611void acct_update_integrals(struct task_struct *tsk)
612{
613 if (likely(tsk->mm)) {
614 long delta =
615 cputime_to_jiffies(tsk->stime) - tsk->acct_stimexpd;
616
617 if (delta == 0)
618 return;
619 tsk->acct_stimexpd = tsk->stime;
620 tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm);
621 tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
622 }
623}
624
625/**
626 * acct_clear_integrals - clear the mm integral fields in task_struct
627 * @tsk: task_struct whose accounting fields are cleared
628 */
629void acct_clear_integrals(struct task_struct *tsk)
630{
631 tsk->acct_stimexpd = 0;
632 tsk->acct_rss_mem1 = 0;
633 tsk->acct_vm_mem1 = 0;
634}