summaryrefslogtreecommitdiffstats
path: root/fs/proc/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/stat.c')
-rw-r--r--fs/proc/stat.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 2a30d67dd6b8..714d5d131e76 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -30,7 +30,7 @@ static cputime64_t get_idle_time(int cpu)
if (idle_time == -1ULL) {
/* !NO_HZ so we can rely on cpustat.idle */
idle = kstat_cpu(cpu).cpustat.idle;
- idle = cputime64_add(idle, arch_idle_time(cpu));
+ idle += arch_idle_time(cpu);
} else
idle = nsecs_to_jiffies64(1000 * idle_time);
@@ -63,23 +63,22 @@ static int show_stat(struct seq_file *p, void *v)
struct timespec boottime;
user = nice = system = idle = iowait =
- irq = softirq = steal = cputime64_zero;
- guest = guest_nice = cputime64_zero;
+ irq = softirq = steal = 0;
+ guest = guest_nice = 0;
getboottime(&boottime);
jif = boottime.tv_sec;
for_each_possible_cpu(i) {
- user = cputime64_add(user, kstat_cpu(i).cpustat.user);
- nice = cputime64_add(nice, kstat_cpu(i).cpustat.nice);
- system = cputime64_add(system, kstat_cpu(i).cpustat.system);
- idle = cputime64_add(idle, get_idle_time(i));
- iowait = cputime64_add(iowait, get_iowait_time(i));
- irq = cputime64_add(irq, kstat_cpu(i).cpustat.irq);
- softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq);
- steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
- guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
- guest_nice = cputime64_add(guest_nice,
- kstat_cpu(i).cpustat.guest_nice);
+ user += kstat_cpu(i).cpustat.user;
+ nice += kstat_cpu(i).cpustat.nice;
+ system += kstat_cpu(i).cpustat.system;
+ idle += get_idle_time(i);
+ iowait += get_iowait_time(i);
+ irq += kstat_cpu(i).cpustat.irq;
+ softirq += kstat_cpu(i).cpustat.softirq;
+ steal += kstat_cpu(i).cpustat.steal;
+ guest += kstat_cpu(i).cpustat.guest;
+ guest_nice += kstat_cpu(i).cpustat.guest_nice;
sum += kstat_cpu_irqs_sum(i);
sum += arch_irq_stat_cpu(i);