From c66f08be7e3ad0a28bcd9a0aef766fdf08ea0ec6 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Thu, 18 Oct 2007 03:06:34 -0700 Subject: Add scaled time to taskstats based process accounting This adds items to the taststats struct to account for user and system time based on scaling the CPU frequency and instruction issue rates. Adds account_(user|system)_time_scaled callbacks which architectures can use to account for time using this mechanism. Signed-off-by: Michael Neuling Cc: Balbir Singh Cc: Jay Lan Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/fork.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel/fork.c') diff --git a/kernel/fork.c b/kernel/fork.c index 1232aac6a1c..2ce28f165e3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1059,6 +1059,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, p->utime = cputime_zero; p->stime = cputime_zero; p->gtime = cputime_zero; + p->utimescaled = cputime_zero; + p->stimescaled = cputime_zero; #ifdef CONFIG_TASK_XACCT p->rchar = 0; /* I/O counter: bytes read */ -- cgit v1.2.3