From: "tip-bot2 for Frederic Weisbecker" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Peter Zijlstra <peterz@infradead.org>,
Wanpeng Li <wanpengli@tencent.com>,
Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [tip: sched/core] rackmeter: Use vtime aware kcpustat accessor
Date: Thu, 21 Nov 2019 16:48:07 -0000 [thread overview]
Message-ID: <157435488743.21853.7693299705375133100.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20191121024430.19938-7-frederic@kernel.org>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 8392853e964c025b0616bd54c0cdf9cbc3c9a769
Gitweb: https://git.kernel.org/tip/8392853e964c025b0616bd54c0cdf9cbc3c9a769
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Thu, 21 Nov 2019 03:44:30 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 21 Nov 2019 07:59:00 +01:00
rackmeter: Use vtime aware kcpustat accessor
Now that we have a vtime safe kcpustat accessor, use it to fetch
CPUTIME_NICE and fix frozen kcpustat values on nohz_full CPUs.
Reported-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wanpeng Li <wanpengli@tencent.com>
Link: https://lkml.kernel.org/r/20191121024430.19938-7-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/macintosh/rack-meter.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 4134e58..60311e8 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -81,13 +81,14 @@ static int rackmeter_ignore_nice;
*/
static inline u64 get_cpu_idle_time(unsigned int cpu)
{
+ struct kernel_cpustat *kcpustat = &kcpustat_cpu(cpu);
u64 retval;
- retval = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE] +
- kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
+ retval = kcpustat->cpustat[CPUTIME_IDLE] +
+ kcpustat->cpustat[CPUTIME_IOWAIT];
if (rackmeter_ignore_nice)
- retval += kcpustat_cpu(cpu).cpustat[CPUTIME_NICE];
+ retval += kcpustat_field(kcpustat, CPUTIME_NICE, cpu);
return retval;
}
prev parent reply other threads:[~2019-11-21 16:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 2:44 [PATCH 0/6] sched/nohz: Make the rest of kcpustat vtime aware v3 Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 1/6] sched/cputime: Support other fields on kcpustat_field() Frederic Weisbecker
2019-11-21 16:48 ` [tip: sched/core] " tip-bot2 for Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 2/6] sched/vtime: Bring up complete kcpustat accessor Frederic Weisbecker
2019-11-21 16:48 ` [tip: sched/core] " tip-bot2 for Frederic Weisbecker
2019-12-28 20:56 ` [PATCH 2/6] " Chris Wilson
2019-12-30 1:08 ` Frederic Weisbecker
2019-12-30 9:04 ` [PATCH] sched/vtime: Prevent unstable evaluation of WARN(vtime->state) Chris Wilson
2019-12-30 17:39 ` Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 3/6] procfs: Use all-in-one vtime aware kcpustat accessor Frederic Weisbecker
2019-11-21 16:48 ` [tip: sched/core] " tip-bot2 for Frederic Weisbecker
2019-12-08 15:57 ` [PATCH 3/6] " Paul Orlyk
2019-12-09 15:50 ` Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 4/6] cpufreq: Use vtime aware kcpustat accessors for user time Frederic Weisbecker
2019-11-21 16:48 ` [tip: sched/core] " tip-bot2 for Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 5/6] leds: Use all-in-one vtime aware kcpustat accessor Frederic Weisbecker
2019-11-21 6:58 ` Ingo Molnar
2019-11-21 14:14 ` Frederic Weisbecker
2019-11-21 16:49 ` Ingo Molnar
2019-11-21 16:48 ` [tip: sched/core] " tip-bot2 for Frederic Weisbecker
2019-11-21 2:44 ` [PATCH 6/6] rackmeter: Use " Frederic Weisbecker
2019-11-21 16:48 ` tip-bot2 for Frederic Weisbecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=157435488743.21853.7693299705375133100.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=benh@kernel.crashing.org \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
--cc=yauheni.kaliuta@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®