Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210142 > unrolled thread
| Started by | Jisheng Zhang <jszhang@marvell.com> |
|---|---|
| First post | 2015-08-20 07:00 +0200 |
| Last post | 2015-08-20 21:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] sched/idle/x86: add missing trace_cpu_idle to mwait_idle() Jisheng Zhang <jszhang@marvell.com> - 2015-08-20 07:00 +0200
[tip:x86/urgent] x86/idle: Restore trace_cpu_idle to mwait_idle() calls tip-bot for Jisheng Zhang <tipbot@zytor.com> - 2015-08-20 21:50 +0200
| From | Jisheng Zhang <jszhang@marvell.com> |
|---|---|
| Date | 2015-08-20 07:00 +0200 |
| Subject | [PATCH] sched/idle/x86: add missing trace_cpu_idle to mwait_idle() |
| Message-ID | <pZq7g-2Kl-1@gated-at.bofh.it> |
Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot
hangs, to improve power savings and to improve performance") restores
mwait_idle(), but the trace_cpu_idle related callings are missing,
this causes powertop on my old desktop powered by Intel Core2 E6550
reports zero wakeups and zero events.
After this patch, the powertop tool works again.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...")
---
arch/x86/kernel/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 397688b..c27cad7 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -408,6 +408,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
static void mwait_idle(void)
{
if (!current_set_polling_and_test()) {
+ trace_cpu_idle_rcuidle(1, smp_processor_id());
if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
smp_mb(); /* quirk */
clflush((void *)¤t_thread_info()->flags);
@@ -419,6 +420,7 @@ static void mwait_idle(void)
__sti_mwait(0, 0);
else
local_irq_enable();
+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
} else {
local_irq_enable();
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | tip-bot for Jisheng Zhang <tipbot@zytor.com> |
|---|---|
| Date | 2015-08-20 21:50 +0200 |
| Subject | [tip:x86/urgent] x86/idle: Restore trace_cpu_idle to mwait_idle() calls |
| Message-ID | <pZE0x-6as-5@gated-at.bofh.it> |
| In reply to | #1210142 |
Commit-ID: e43d0189ac02415fe4487f79fc35e8f147e9ea0d
Gitweb: http://git.kernel.org/tip/e43d0189ac02415fe4487f79fc35e8f147e9ea0d
Author: Jisheng Zhang <jszhang@marvell.com>
AuthorDate: Thu, 20 Aug 2015 12:54:39 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 20 Aug 2015 21:37:45 +0200
x86/idle: Restore trace_cpu_idle to mwait_idle() calls
Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot
hangs, to improve power savings and to improve performance") restores
mwait_idle(), but the trace_cpu_idle related calls are missing. This
causes powertop on my old desktop powered by Intel Core2 E6550 to
report zero wakeups and zero events.
Add them back to restore the proper behaviour.
Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...")
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Cc: <len.brown@intel.com>
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1440046479-4262-1-git-send-email-jszhang@marvell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 397688b..c27cad7 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -408,6 +408,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
static void mwait_idle(void)
{
if (!current_set_polling_and_test()) {
+ trace_cpu_idle_rcuidle(1, smp_processor_id());
if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
smp_mb(); /* quirk */
clflush((void *)¤t_thread_info()->flags);
@@ -419,6 +420,7 @@ static void mwait_idle(void)
__sti_mwait(0, 0);
else
local_irq_enable();
+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
} else {
local_irq_enable();
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web