diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-31 09:11:37 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-31 09:11:46 -0500 |
commit | 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4 (patch) | |
tree | cbe69310a66176dea2a9e7bd201db95efe4a2890 /include | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
[PATCH] fix scaled & unscaled cputime accounting
The utimescaled / stimescaled fields in the task structure and the
global cpustat should be set on all architectures. On s390 the calls
to account_user_time_scaled and account_system_time_scaled never have
been added. In addition system time that is accounted as guest time
to the user time of a process is accounted to the scaled system time
instead of the scaled user time.
To fix the bugs and to prevent future forgetfulness this patch merges
account_system_time_scaled into account_system_time and
account_user_time_scaled into account_user_time.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Michael Neuling <mikey@neuling.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel_stat.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 4ee4b3d2316f..c78a459662a6 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -79,10 +79,8 @@ static inline unsigned int kstat_irqs(unsigned int irq) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | extern unsigned long long task_delta_exec(struct task_struct *); | 81 | extern unsigned long long task_delta_exec(struct task_struct *); |
82 | extern void account_user_time(struct task_struct *, cputime_t); | 82 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); |
83 | extern void account_user_time_scaled(struct task_struct *, cputime_t); | 83 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); |
84 | extern void account_system_time(struct task_struct *, int, cputime_t); | ||
85 | extern void account_system_time_scaled(struct task_struct *, cputime_t); | ||
86 | extern void account_steal_time(struct task_struct *, cputime_t); | 84 | extern void account_steal_time(struct task_struct *, cputime_t); |
87 | 85 | ||
88 | #endif /* _LINUX_KERNEL_STAT_H */ | 86 | #endif /* _LINUX_KERNEL_STAT_H */ |