Andrey Ryabinin writes:
> static int cpuacct_stats_show(struct seq_file *sf, void *v)
> {
...
> for_each_possible_cpu(cpu) {
> u64 *cpustat = per_cpu_ptr(ca->cpustat, cpu)->cpustat;
>
> - val[CPUACCT_STAT_USER] += cpustat[CPUTIME_USER];
> -
cpuacct.stat shows user time based on raw random precision tick
based counters. Use cputime_addjust() to scale these values against the
total runtime accounted by the scheduler, like we already do
for user/system times in /proc//stat.
Signed-off-by: Andrey Ryabinin
---
kernel/sched/cpuacct.c |
2 matches
Mail list logo