summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2012-03-19 11:26:19 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:24:26 +0800
commit196df6930b1220bab3226f383f352aa2ce5f565a (patch)
tree1a2d9a6efc823ce2ad0fc2a62f57ab9320fd468d /include
parent79a75405b0a2be2fdbb5d90ce4b635424f5d53a5 (diff)
ENGR00176177-2 Add irq count mechanism to interactive governor
Add irq count to CPUFreq as a freq change condition. Because some devices' working mode is unable to issue CPUFreq change because of low CPU loading, but the cpu freq will impact these devices' performace significantly. Interactive govervor will sample the cpu loading as well as the irq count which is registered. If the loading or the irq count exceed the threshold we set, governor will issue an CPUFreq change request. These devices' irq threshold and enable/disable can be modified via /sys/devices/system/cpu/cpufreq/interactive/irq_scaling echo 0xAABBBC to change the default setting as below AA : irq number BBB: threshold C :enable or disable Currently only enable USDHC3, USDHC4, GPU, SATA and USB by default, we can add device to the init struct which is located in arch/arm/mach-mx6/irq.c. Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpufreq.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index ae06dc9a0cda..a61416fe63f2 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -68,6 +68,18 @@ struct cpufreq_governor;
/* /sys/devices/system/cpu/cpufreq: entry point for global variables */
extern struct kobject *cpufreq_global_kobject;
+/* For some peripheral devices, which will generate irq very frequently
+ * and take very short time to handle irq, in this scenario, CPUFreq will
+ * not issue cpu freq change, but the devices' performance will be impacted
+ * significantly, we need to add irq number check to be as one condition of
+ * CPU freq change. */
+#define MAX_CPUFREQ_IRQ_NUMBER 10
+struct irq_tuner {
+ unsigned int irq_number;
+ unsigned int up_threshold;
+ bool enable;
+};
+
#define CPUFREQ_ETERNAL (-1)
struct cpufreq_cpuinfo {
unsigned int max_freq;