summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2012-03-19 11:26:19 +0800
committerAnson Huang <b20788@freescale.com>2012-03-26 10:25:36 +0800
commit867561b612ceed2e6bf569acf4b6f9a84ae19414 (patch)
tree63b7f1a7342cff84553811af1b96ed0b09858be4 /include
parent9b36e35d8f309eb93f31fa4b362540ff23eb0251 (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;