summaryrefslogtreecommitdiff
path: root/fs/proc/uptime.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@parallels.com>2011-11-28 16:45:17 (GMT)
committerIngo Molnar <mingo@elte.hu>2011-12-06 08:06:38 (GMT)
commit3292beb340c76884427faa1f5d6085719477d889 (patch)
treecb7e431b2a15fa66ef5278d485131bac7a125fbd /fs/proc/uptime.c
parent786d6dc7aeb2bfbfe417507b7beb83919f319db3 (diff)
downloadlinux-3292beb340c76884427faa1f5d6085719477d889.tar.xz
sched/accounting: Change cpustat fields to an array
This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa <glommer@parallels.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Tuner <pjt@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1322498719-2255-2-git-send-email-glommer@parallels.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc/uptime.c')
-rw-r--r--fs/proc/uptime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index 766b1d4..0fb22e4 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -12,10 +12,10 @@ static int uptime_proc_show(struct seq_file *m, void *v)
struct timespec uptime;
struct timespec idle;
int i;
- cputime_t idletime = cputime_zero;
+ u64 idletime = 0;
for_each_possible_cpu(i)
- idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle);
+ idletime += kcpustat_cpu(i).cpustat[CPUTIME_IDLE];
do_posix_clock_monotonic_gettime(&uptime);
monotonic_to_bootbased(&uptime);