diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2019-10-16 04:56:58 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-10-29 10:01:17 +0100 |
commit | ae37fe5c07508e1c3dcdd41c9127e5d50d31013d (patch) | |
tree | 1edc665de6528d23ffee1816c8d11bf92554b707 /fs | |
parent | sched/kcpustat: Introduce vtime-aware kcpustat accessor for CPUTIME_SYSTEM (diff) | |
download | linux-ae37fe5c07508e1c3dcdd41c9127e5d50d31013d.tar.xz linux-ae37fe5c07508e1c3dcdd41c9127e5d50d31013d.zip |
procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use
it to start fixing frozen kcpustat values on nohz_full CPUs.
Reported-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rjw@rjwysocki.net>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Wanpeng Li <wanpengli@tencent.com>
Link: https://lkml.kernel.org/r/20191016025700.31277-13-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/stat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 80c305f206bb..5c6bd0ae3802 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -124,7 +124,7 @@ static int show_stat(struct seq_file *p, void *v) user += kcs->cpustat[CPUTIME_USER]; nice += kcs->cpustat[CPUTIME_NICE]; - system += kcs->cpustat[CPUTIME_SYSTEM]; + system += kcpustat_field(kcs, CPUTIME_SYSTEM, i); idle += get_idle_time(kcs, i); iowait += get_iowait_time(kcs, i); irq += kcs->cpustat[CPUTIME_IRQ]; @@ -162,7 +162,7 @@ static int show_stat(struct seq_file *p, void *v) /* Copy values here to work around gcc-2.95.3, gcc-2.96 */ user = kcs->cpustat[CPUTIME_USER]; nice = kcs->cpustat[CPUTIME_NICE]; - system = kcs->cpustat[CPUTIME_SYSTEM]; + system = kcpustat_field(kcs, CPUTIME_SYSTEM, i); idle = get_idle_time(kcs, i); iowait = get_iowait_time(kcs, i); irq = kcs->cpustat[CPUTIME_IRQ]; |