Re: [PATCH 4/4] sched/cpuacct: Make user/system times in cpuacct.stat more precise

2021-03-17 Thread Daniel Jordan
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]; > -

[PATCH 4/4] sched/cpuacct: Make user/system times in cpuacct.stat more precise

2021-02-17 Thread Andrey Ryabinin
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 |