[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1385508011-26914-4-git-send-email-jacob.jun.pan@linux.intel.com>
Date: Tue, 26 Nov 2013 15:20:11 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Rafael Wysocki <rafael.j.wysocki@...el.com>,
Len Brown <len.brown@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Subject: [PATCH 3/3] thermal/powerclamp: communicate with pm qos when injecting idle
During idle injection period, CPU PM QOS class shall be ignored.
This will indirectly influence the idle governors to choose the
deepest idle states.
Signed-off-by: Jacob Pan <jacob.jun.pan@...ux.intel.com>
---
drivers/thermal/intel_powerclamp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c
index de90f89..62dbf95 100644
--- a/drivers/thermal/intel_powerclamp.c
+++ b/drivers/thermal/intel_powerclamp.c
@@ -51,6 +51,7 @@
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/sched/rt.h>
+#include <linux/pm_qos.h>
#include <asm/nmi.h>
#include <asm/msr.h>
@@ -483,6 +484,10 @@ static int start_power_clamp(void)
clamping = true;
schedule_delayed_work(&poll_pkg_cstate_work, 0);
+ /* Tell PM QOS all CPU constraints are ignored during idle injection */
+ pm_qos_set_constraint_class_state(PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_CONSTRAINT_IGNORED);
+
/* start one thread per online cpu */
for_each_online_cpu(cpu) {
struct task_struct **p =
@@ -524,6 +529,9 @@ static void end_power_clamp(void)
kthread_stop(thread);
}
}
+ /* make CPU PM QOS active again */
+ pm_qos_set_constraint_class_state(PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_CONSTRAINT_AVAILABLE);
}
static int powerclamp_cpu_callback(struct notifier_block *nfb,
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists