summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-31 04:50:34 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-31 04:50:34 +0000
commit5095b4a83ecb0635d5d6588d00ee6b76e1ef29be (patch)
tree8cd1ced52d4a413410e6c0345905d3d9fd269493
parent005dc04445cb3ad2a8789d0c4e4a3bf18e17de96 (diff)
Fix for machines with HZ != 100.
-rw-r--r--fs/proc/array.c16
-rw-r--r--fs/proc/proc_misc.c11
2 files changed, 14 insertions, 13 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 181cc4e62..eebb1f470 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -339,10 +339,10 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
task->cmin_flt,
task->maj_flt,
task->cmaj_flt,
- task->times.tms_utime,
- task->times.tms_stime,
- task->times.tms_cutime,
- task->times.tms_cstime,
+ HZ_TO_STD(task->times.tms_utime),
+ HZ_TO_STD(task->times.tms_stime),
+ HZ_TO_STD(task->times.tms_cutime),
+ HZ_TO_STD(task->times.tms_cstime),
priority,
nice,
0UL /* removed */,
@@ -642,14 +642,14 @@ int proc_pid_cpu(struct task_struct *task, char * buffer)
len = sprintf(buffer,
"cpu %lu %lu\n",
- task->times.tms_utime,
- task->times.tms_stime);
+ HZ_TO_STD(task->times.tms_utime),
+ HZ_TO_STD(task->times.tms_stime));
for (i = 0 ; i < smp_num_cpus; i++)
len += sprintf(buffer + len, "cpu%d %lu %lu\n",
i,
- task->per_cpu_utime[cpu_logical_map(i)],
- task->per_cpu_stime[cpu_logical_map(i)]);
+ HZ_TO_STD(task->per_cpu_utime[cpu_logical_map(i)]),
+ HZ_TO_STD(task->per_cpu_stime[cpu_logical_map(i)]));
return len;
}
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 8ea9813a6..97f74a028 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -286,7 +286,7 @@ static int kstat_read_proc(char *page, char **start, off_t off,
int i, len;
unsigned sum = 0;
extern unsigned long total_forks;
- unsigned long jif = jiffies;
+ unsigned long jif = HZ_TO_STD(jiffies);
for (i = 0 ; i < NR_IRQS ; i++)
sum += kstat_irqs(i);
@@ -327,10 +327,11 @@ static int kstat_read_proc(char *page, char **start, off_t off,
"page %u %u\n"
"swap %u %u\n"
"intr %u",
- kstat.cpu_user,
- kstat.cpu_nice,
- kstat.cpu_system,
- jif*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
+ HZ_TO_STD(kstat.cpu_user),
+ HZ_TO_STD(kstat.cpu_nice),
+ HZ_TO_STD(kstat.cpu_system),
+ jif*smp_num_cpus - HZ_TO_STD(kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
+
#endif
kstat.dk_drive[0], kstat.dk_drive[1],
kstat.dk_drive[2], kstat.dk_drive[3],