* [PATCH 1/1] proc/stat: Fix wrong guest nice cpustat value
@ 2019-12-05 2:03 Frederic Weisbecker
2019-12-11 6:15 ` [tip: sched/urgent] sched/cputime, proc/stat: Fix incorrect " tip-bot2 for Flavio Leitner
0 siblings, 1 reply; 2+ messages in thread
From: Frederic Weisbecker @ 2019-12-05 2:03 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: LKML, Flavio Leitner, Frederic Weisbecker
From: Flavio Leitner <fbl@sysclose.org>
The value being used for guest_nice should be CPUTIME_GUEST_NICE
and not CPUTIME_USER.
Fixes: 26dae145a76c ("procfs: Use all-in-one vtime aware kcpustat accessor")
Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
fs/proc/stat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 37bdbec5b402..fd931d3e77be 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -134,7 +134,7 @@ static int show_stat(struct seq_file *p, void *v)
softirq += cpustat[CPUTIME_SOFTIRQ];
steal += cpustat[CPUTIME_STEAL];
guest += cpustat[CPUTIME_GUEST];
- guest_nice += cpustat[CPUTIME_USER];
+ guest_nice += cpustat[CPUTIME_GUEST_NICE];
sum += kstat_cpu_irqs_sum(i);
sum += arch_irq_stat_cpu(i);
@@ -175,7 +175,7 @@ static int show_stat(struct seq_file *p, void *v)
softirq = cpustat[CPUTIME_SOFTIRQ];
steal = cpustat[CPUTIME_STEAL];
guest = cpustat[CPUTIME_GUEST];
- guest_nice = cpustat[CPUTIME_USER];
+ guest_nice = cpustat[CPUTIME_GUEST_NICE];
seq_printf(p, "cpu%d", i);
seq_put_decimal_ull(p, " ", nsec_to_clock_t(user));
seq_put_decimal_ull(p, " ", nsec_to_clock_t(nice));
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [tip: sched/urgent] sched/cputime, proc/stat: Fix incorrect guest nice cpustat value
2019-12-05 2:03 [PATCH 1/1] proc/stat: Fix wrong guest nice cpustat value Frederic Weisbecker
@ 2019-12-11 6:15 ` tip-bot2 for Flavio Leitner
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Flavio Leitner @ 2019-12-11 6:15 UTC (permalink / raw)
To: linux-tip-commits
Cc: Flavio Leitner, Frederic Weisbecker, Peter Zijlstra, Ingo Molnar,
x86, LKML
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 346da4d2c7ea39de65487b249aaa4733317a40ec
Gitweb: https://git.kernel.org/tip/346da4d2c7ea39de65487b249aaa4733317a40ec
Author: Flavio Leitner <fbl@sysclose.org>
AuthorDate: Thu, 05 Dec 2019 03:03:44 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 11 Dec 2019 07:09:58 +01:00
sched/cputime, proc/stat: Fix incorrect guest nice cpustat value
The value being used for guest_nice should be CPUTIME_GUEST_NICE
and not CPUTIME_USER.
Fixes: 26dae145a76c ("procfs: Use all-in-one vtime aware kcpustat accessor")
Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20191205020344.14940-1-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
fs/proc/stat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 37bdbec..fd931d3 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -134,7 +134,7 @@ static int show_stat(struct seq_file *p, void *v)
softirq += cpustat[CPUTIME_SOFTIRQ];
steal += cpustat[CPUTIME_STEAL];
guest += cpustat[CPUTIME_GUEST];
- guest_nice += cpustat[CPUTIME_USER];
+ guest_nice += cpustat[CPUTIME_GUEST_NICE];
sum += kstat_cpu_irqs_sum(i);
sum += arch_irq_stat_cpu(i);
@@ -175,7 +175,7 @@ static int show_stat(struct seq_file *p, void *v)
softirq = cpustat[CPUTIME_SOFTIRQ];
steal = cpustat[CPUTIME_STEAL];
guest = cpustat[CPUTIME_GUEST];
- guest_nice = cpustat[CPUTIME_USER];
+ guest_nice = cpustat[CPUTIME_GUEST_NICE];
seq_printf(p, "cpu%d", i);
seq_put_decimal_ull(p, " ", nsec_to_clock_t(user));
seq_put_decimal_ull(p, " ", nsec_to_clock_t(nice));
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-11 6:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05 2:03 [PATCH 1/1] proc/stat: Fix wrong guest nice cpustat value Frederic Weisbecker
2019-12-11 6:15 ` [tip: sched/urgent] sched/cputime, proc/stat: Fix incorrect " tip-bot2 for Flavio Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox