summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
AgeCommit message (Collapse)Author
2012-09-20cpufreq: interactive: Unify Governor Lock StrategyMatt Wagner
Change our locking strategy to be the same as the conservative and ondemand governor for GOV_START and GOV_STOP to allow for correct handling of multiple CPUs Bug 1049258 Change-Id: I15ab620e2f9d47b00ec8186c224eb719b9735aa7 Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/133360 Reviewed-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-09-11cpufreq: interactive: Add Uevent Signal on Gov StartMatt Wagner
Sends kobject_uevent signal back to userspace to signal that the cpufreq governor has been set to interactive Bug 1039141 Change-Id: I699e9d5834a1874b36c675764c080112ccba0f9f Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/131224 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-08-01ARM: Tegra: Added support to run at two frequency modesXiao Bo Zhao
CPU clock is now capped at an normal frequency that is below its maximum and allowed to run at a high frequency only once within a period of time. By default the delay is set to 5*DOWN_DELAY, allowing a maximum of 20% high frequency time. Sysfs knobs were also added that allows userspace tuning Bug 1003531 Change-Id: Ie4a0e565630187bdacd6f31b1f35778eb31bfc81 Signed-off-by: Xiao Bo Zhao <xiaoboz@nvidia.com> Reviewed-on: http://git-master/r/118163 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-07-20cpufreq: interactive: clean up sysfs declarationsIlan Aelion
Cosmetics: introducing a macro to define unsigned long sysfs nodes. Change-Id: I594a527dc977437405167237e8d5ac6d3a3167d2 Signed-off-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-on: http://git-master/r/113020 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-07-16cpufreq: protect cpufreq_stats_free_table with spinlockPeter Boonstoppel
Prevents crash on cpufreq_stat_notifier_trans when cpufreq_stats_table has been freed due to a core being hotplugged out. Bug 948348 Change-Id: I2640a9a23c9a79cad8c76bfefd243a07162d2004 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> (cherry picked from commit 03070a4b0b8eb74825c99c6bbfb108ddb36a041c) Reviewed-on: http://git-master/r/114248 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-13cpufreq: Protected access of policy attributePuneet Saxena
It takes read RW semaphore to access policy governor bug 997731 Change-Id: Ibdc3dd54cf6076c0fef4bc58f144e4bcb4631d76 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/107079 GVS: Gerrit_Virtual_Submit Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-07-06cpufreq: mid-range frequency biassatya popuri
Restrict go_maxspeed_load and max_boost at mid-range frequencies. Change-Id: I9e3c59bbe708b428e12ce4dbef2144be09751d5a Signed-off-by: satya popuri <spopuri@nvidia.com> Reviewed-on: http://git-master/r/111754 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karthikeyan Samynathan <ksamynathan@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-07-03cpufreq: fix memory leak with sysfs when stats table are freedShaoming Feng
bug 1001593 Change-Id: Ib1bf525e5c4c7ed633073a3d0b990703840dad77 Signed-off-by: Shaoming Feng <shaomingf@nvidia.com> Reviewed-on: http://git-master/r/112025 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
2012-05-17cpufreq: Don't clip PM QoS requests to old policy limitsAlex Frid
Clipping PM QoS requests to combined old policy limits that include both PM QoS and user policy requests creates a circular dependency. As a result new PM QoS maximum limit is rejected if it is above previous PM QoS minimum limit even though the new PM QoS minimum limit has been already lowered below new PM QoS maximum limit. Instead clip PM QoS request to the old user policy limits only. Change-Id: Ice0a53a699e0798f07f0e32d6b8a28586fe5db0c Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/102386 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Antti Miettinen <amiettinen@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Vikas Ramesh Kedigehalli <vikasr@nvidia.com>
2012-05-08cpufreq: interface for setting governor for a cpuPuneet Saxena
This implementation sets governor for a cpu using existing cpufreq interfaces. bug 871958 Change-Id: Ic4e7e2a2b0babaf1829b559b5db211666d449b86 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/97939 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-04-16cpufreq: interactive: change timer rateShridhar Rasal
Tune *timer_rate* used to increase cpu frequency. bug 943712 Change-Id: I3ded757e21825c475606976c2dcfcd75d9467ef8 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/96525 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-04-12tracing: Add tracepoints for CPU scalingAntti P Miettinen
Simple tracepoints for measuring CPU scaling latencies. Bug 960307 Change-Id: I6fd4e67e352a2ff134da58866d943457506d080b Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/93080 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-03-21cpufreq: Typecast compared integersAntti P Miettinen
The min/max frequencies in cpufreq_policy are unsigned integers but pm_qos_request() returns a signed int. Compare as unsigned, frequencies are never negative. Bug 949219 Change-Id: Iba0de9ad6bf221f7a2e5560f597aa56cbeb7b6f6 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/91214 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-03-21cpufreq: set go_maxspeed_load to 85%Shridhar Rasal
To get better performance setting it to 85% from 95% bug 941275 Change-Id: I08bc711ea159d070cf6b62ce25506c8a5bdd7ac4 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/91159 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-03-20cpufreq: update target freq alwaysShridhar Rasal
set determined target freq always bug 941275 Change-Id: If72936ed145867abd32b43c5c5100290df2fc187 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/91010 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-03-15cpufreq: Add a knob to treat IO wait as busysatya popuri
The new sysfs node io_is_busy enables the interactive governor to account any time spent by the CPU waiting for IO as non-idle time. This helps us improve run-time of IO bound tasks by making up for lost IO time in speeding up the CPU bound parts of the task. Reviewed on http://git-master/r/#change,86894 cherry picked from 13a15aadc1134b5dae05cdcf9687396644f87411 Signed-off-by: satya popuri <spopuri@nvidia.com> Change-Id: I4a14ed7fef5fbce00054bb02d52d2d3e0f011f70 Reviewed-on: http://git-master/r/89218 Reviewed-by: Satya Popuri <spopuri@nvidia.com> Tested-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-03-15cpufreq: change min_sample_timesatya popuri
We prefer a min_sample_time of 30ms. This is tied to our cluster switch and auto-hotplug artificial delays. Signed-off-by: satya popuri <spopuri@nvidia.com> original commit message: cpufreq: reduce min_sample_time Reduce the minimum amount of time the interactive governor spends at a frequency before ramping down. This parameter (min_sample_time) was 80ms now reduced to 30 ms based on perf and power sweep numbers. Reviewed-on: http://git-master/r/86900 (cherry picked from commit 581f20a5b7b8c3e4ee2c211b28dbc81510af2ae7). Signed-off-by: satya popuri <spopuri@nvidia.com> Change-Id: I24f4cd52737950fd4e78a36b4ee34a84551e0e12 Reviewed-on: http://git-master/r/89217 Reviewed-by: Satya Popuri <spopuri@nvidia.com> Tested-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-03-06cpufreq: ondemand: Prevent sysfs create racePeter Boonstoppel
Protecting sysfs_remove_group() in CPUFREQ_GOV_STOP with dbs_mutex Bug 946462 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/86426 (cherry picked from commit d1131158e2ad4d5ccc53b3008743c29385650d86) Change-Id: Iae810e83eaa6f0f7d970b56238cbcb61118af610 Reviewed-on: http://git-master/r/87392 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
2012-02-21cpufreq interactive governor: Unify attribute store functionsPeter Boonstoppel
Change our added attributes' store functions to Google style Change-Id: I5dc641112085698918e87b52378fe3a5bfe44360 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/84452 Reviewed-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-02-10cpufreq interactive governor: Reduce permissionsDan Willemsen
Reduce permissions on the max_boost and go_maxspeed_load, the init scripts will change their owner so the current users continue to work. Bug 906796 Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/79096 (cherry picked from commit f1d91095baff48e58a04af0062f579f394094b47) Change-Id: Id9542a202bcf02f886cfee9c0bbe69cc83b8c200 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/82726 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-02-09cpufreq: properly clamp QoS min/maxDonghan Ryu
typically PM QoS clients request the maximum cpu frequency by setting cpu_freq_min to INT_MAX. Therefore, we need to clamp INT_MAX to whatever the maximum frequency allowed by the policy to make the requested cpu_freq_min is same as the maximum allowed cpu frequency. Inverse logic applies to the cpu_freq_max as well. Bug 932477 Signed-off-by: Donghan Ryu <dryu@nvidia.com> Reviewed-on: http://git-master/r/78401 (cherry picked from commit 9688430a621515f3afe3e0ab358ea7ad5aab6d91) Change-Id: Ie5edcd4a873ed5cce45ec0f9b981f28db6091ff1 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/80002 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-01-19cpufreq: Preserve sysfs min/max requestAntti P Miettinen
Store the value received via sysfs as the user_policy min/max value instead of the currently enforced min/max. This allows restoring the user min/max values when constraints on enforced min/max change. Bug 888312 Change-Id: I8a5adf022585e5bd91fa3b1d8d448065efa6827a Reviewed-on: http://git-master/r/73982 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75886 Reviewed-by: Automatic_Commit_Validation_User
2012-01-19cpufreq: Enforce PM QoS min/max limitsAntti P Miettinen
Observe PM QoS CPU frequency minimum and maximum in addition to policy settings. Bug 888312 Change-Id: Ia4f60a1649a9952e02f6847c8add3b2ea5d47524 Reviewed-on: http://git-master/r/72207 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75884 Reviewed-by: Automatic_Commit_Validation_User
2012-01-19cpufreq: Export user_policy min/maxAntti P Miettinen
Add sysfs nodes for user_policy min and max settings. Bug 888312 Change-Id: Ife8ec07f8faebc0c04e7ecf6e24976a311bad73b Reviewed-on: http://git-master/r/72201 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75882 Reviewed-by: Automatic_Commit_Validation_User
2011-12-08cpufreq interactive governor: Made sysfs nodes writablePeter Boonstoppel
max_boost and go_maxspeed_load need to be writable for service that controls balanced power mode Cherry-picked from: http://git-master/r/#change,57965 Change-Id: I0e3a39ddf317a0f7ba3bb4908afc8a100db1b883 Signed-off-by: Daniel Solomon <daniels@nvidia.com> Reviewed-on: http://git-master/r/65602 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-08cpufreq interactive governor: Fix attribute write bugPeter Boonstoppel
Attribute store functions used to return 0 upon success, but should return count instead. Change-Id: I2ab15e536d9affbf80bbcb2e557c6d217d5a9dfa Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/68554 Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Daniel Solomon <daniels@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2011-12-08cpufreq interactive governor: add max_boost sysfs nodePeter Boonstoppel
Allows you to specify a max increase in frequency, disabled by default. Cherry-pick from: http://git-master/r/#change,57928 Change-Id: I8174e31faceaa7c27adfe52515e951a4092a39f3 Signed-off-by: Daniel Solomon <daniels@nvidia.com> Reviewed-on: http://git-master/r/65601 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-11-30cpufreq interactive governor: Init idle times on governor startAlex Frid
When governor starts initialize time_in_idle and idle_exit_time variables with current data, and restart timer. This is required to properly start governor on busy CPU that would not enter idle state for a long time. (cherry picked from commit 876dc6eddc68054e6abe23f6287cfbf5302a75b9) (cherry picked from commit d0024f3ad1e4c6d4885355df3fda02435ccc471d) Change-Id: I992ca9193cb95e64cc9ef8bfb86675b32ad6d43d Reviewed-on: http://git-master/r/61712 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Ra79d9a3ca97b0cfd49fb642ba7cafb98c11c04f1
2011-11-30cpufreq interactive governor: Update target frequency calculationAlex Frid
Updated target frequency calculation algorithm to take into account current rate CPU is running at: - When CPU is running below go_maxspeed_load threshold, adjust the target frequency based on current rate to reach tunable sustainable load (instead of applying cpu load to max possible cpu rate). Tuned by setting new node ("0" falls back to using max_rate): /sys/devices/system/cpu/cpufreq/interactive/sustain_load - When CPU is running at/above go_maxspeed_load threshold, ramp the target frequency starting from current exponentially with tunable base (instead of immediate jump to maximum cpu rate). Tuned by setting new node ("0" falls back to jump to max_rate): /sys/devices/system/cpu/cpufreq/interactive/boost_factor Defaults for the new tunning parameters are set to "0" - so no changes in governor default behavior. Original-Change-Id: Ie845d747239ba177e6f06b73965c3213649f8135 Reviewed-on: http://git-master/r/34583 Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Chih-Lung Huang <lhuang@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Rebase-Id: Re898a7b96d3c1b7343e773aab9788e4ff2b1d7f8
2011-11-30Revert "cpufreq: interactive governor: apply intermediate load on current speed"Dan Willemsen
This reverts commit 6f312490bcf93bf51ad4ba8d4965a952f521cb7d. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rf54be39acd2c92decd9e5c4522d2b2e47589d84e
2011-11-30Revert "cpufreq: interactive governor: scale to max only if at min speed"Dan Willemsen
This reverts commit 460145c8b1d2ff8a2488baa10d7421e1d8179b7d. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Racc6c054ac5c67c38dec7281c7190c6650bfb8bd
2011-11-30Revert "cpufreq: interactive governor: go to intermediate hi speed before max"Dan Willemsen
This reverts commit d7e7e4f15c62464dfa5d2c58d73bc66f131795bc. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R4a8c8c91c64c2c1d64ecb22dfe8a7c2cd133fd39
2011-11-30Revert "cpufreq: interactive governor: default 20ms timer"Dan Willemsen
This reverts commit 4714e5222b5a9b11030eda6df7b8159034be0008. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rc7c804305f9c37c4b93d5d7eecce0b9b93499e27
2011-11-30Merge branch 'korg-android-tegra-3.1' into after-upstream-androidDan Willemsen
Conflicts: arch/arm/mach-tegra/Kconfig arch/arm/mach-tegra/board-ventana.c drivers/misc/Kconfig drivers/video/tegra/dc/hdmi.c Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30cpufreq: stats: snap freq to next lower freq when not in tablePeter Boonstoppel
When cpu runs at frequency not in cpufreq table (because of other frequency governing mechanisms), bill time spent at that frequency to next lower frequency in cpufreq stats table. Original-Change-Id: I9cfda4e7a223ca3f773f1adb145d242483209799 Reviewed-on: http://git-master/r/47929 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Tested-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: Rd25650679bddec2837d92c75b18f8568c7569336
2011-11-30cpufreq: prevent out-of-bounds write when stat->last_index = -1Peter Boonstoppel
When cpu runs at a frequency not in cpufreq table (because of other frequency governing mechanisms), freq_table_get_index() returns -1 which gets used as an array index. Original-Change-Id: Id8fa5d5125c3cd1e2aad8b48ff7bd619f39c57d8 Reviewed-on: http://git-master/r/47887 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Tested-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R032fc27d227d3308e5afa17d909f64d6925e05cc
2011-11-30cpufreq: interactive governor: default 20ms timerTodd Poynor
Change-Id: Ie9952f07b38667f2932474090044195c57976faa Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive governor: go to intermediate hi speed before maxTodd Poynor
* Add attribute hispeed_freq, which defaults to max. * Rename go_maxspeed_load to go_hispeed_load. * If hit go_hispeed_load and at min speed, go to hispeed_freq; if hit go_hispeed_load and already above min speed go to max speed. Change-Id: I1050dec5f013fc1177387352ba787a7e1c68703e Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive governor: scale to max only if at min speedTodd Poynor
Change-Id: Ieffb2aa56b5290036285c948718be7be0d3af9e8 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive governor: apply intermediate load on current speedTodd Poynor
Calculate intermediate speed by applyng CPU load to current speed, not max speed. Change-Id: Idecf598b9a203b07c989c5d9e9c6efc67a1afc2e Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30power: cpufreq interactive governor: use default sample time 20msTodd Poynor
Lower the default time at which a higher speed is allowed to run before lowering based on lower CPU load from 80ms to 20ms. Most Android devices should trade power for performance here, although tablets and non-battery-powered devices may want to override this default. Change-Id: I1a4f7faeca12793c51d5b92db30a63cca8d4f1be Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive governor: default timer 10ms, maxspeed load 95%Todd Poynor
Modify default timer from 30ms to 10ms, sampling 2 jiffies after idle exit on ARM as in Honeycomb. Modify default go_maxspeed_load from 85% loaded to 95% loaded, for use in phones where power savings is more important (tablets may be best served overriding this). Change-Id: I3361a6279979bfae1df5262666a2e30ea7a44328 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive: fix possible Division by zero.Axel Haslam
The following dump was seen sometimes while resuming, the only division by zero on this function can happen after delta_time is reassigned, since at the start of the function, there is jump that protects against values less than 1000. After that, If delta_time and delta_idle == 0, we will hit a div 0 Division by zero in kernel. Backtrace: [<c0057184>] (dump_backtrace+0x0/0x110) from [<c05d5ecc>] (dump_stack+0x18/0x1c) r6:010f3000 r5:c113dfb0 r4:c004afb0 r3:c6ff0000 [<c05d5eb4>] (dump_stack+0x0/0x1c) from [<c00572cc>] (__div0+0x1c/0x20) [<c00572b0>] (__div0+0x0/0x20) from [<c02195d4>] (Ldiv0+0x8/0x10) [<c03dfd64>] (cpufreq_interactive_timer+0x0/0x2c0) from [<c00a7efc>] (run_timer_softirq+0x154/0x260) [<c00a7da8>] (run_timer_softirq+0x0/0x260) from [<c00a0c8c>] (__do_softirq+0xc8/0x194) [<c00a0bc4>] (__do_softirq+0x0/0x194) from [<c00a1008>] (irq_exit+0xb4/0xb8) [<c00a0f54>] (irq_exit+0x0/0xb8) from [<c00584b4>] (ipi_timer+0x44/0x48) r4:c004a040 r3:00000001 [<c0058470>] (ipi_timer+0x0/0x48) from [<c004c3e4>] (do_local_timer+0x68/0x84) r5:c004ae2c r4:c07991e8 [<c004c37c>] (do_local_timer+0x0/0x84) from [<c0052948>] (__irq_svc+0x48/0xe0) Change-Id: I639882db67b8d711c5710778ebc212f0f6a998e3 Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Axel Haslam <axelhaslam@ti.com>
2011-11-30cpufreq: interactive: Fix handling of SMP where CPUs must scale in tandemTodd Poynor
The interactive governor relies on quirks of the Tegra 2 cpufreq implementation for handling SMP systems where the CPUs do not have separate rate controls. It needs to determine the maximum rate for all CPUs covered by the policy and set that speed. Change-Id: I1ed9fa171e5a9c45a1fa5944e3fa823eb157e81f Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-30cpufreq: interactive: fix checkpatch warnings on long linesAllen Martin
Fix up checkpatch warning introduced by long lines in timer_rate patch. Change-Id: I22b105dafb1b49390799bb7577464da03f0f8afb Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-11-30cpufreq: interactive: cleanup checkpatch warningsAllen Martin
Cleanup some style warnings reported by checkpatch Change-Id: Ie2e6903d52867fb3347e009d7efa3bc4ca755cea Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-11-30cpufreq: Add more verbose description of interactive governorAllen Martin
Update the Kconfig help paragraph to give more detail about interactive governor. Change-Id: I607b817b370accac3a685001649a15e2f7894f59 Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-11-30cpufreq: interactive: add sysfs control for timer rateAllen Martin
Add a new sysfs control that tunes the rate of the timer used to increase cpu frequency Change-Id: I1aa13ae54bb43aff5b3688984d2955f56aae1658 Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-11-30cpufreq: interactive: Add error checking on sysfs interfacesAllen Martin
This adds better error checking on tunable parameters on sysfs interfaces. Also fixes return value from these functions, previously on success they would return 0 which would cause a infinite loop. Change-Id: Ic05038492166f8673d007202092471f98a2f0dfa Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-11-30cpufreq: interactive: use idle notifierAllen Martin
Convert interactive governor to use idle notifier instead of hooking pm_idle directly. Change-Id: I47e007f330468ac559240a0ae8a3cb06a89ccb67 Signed-off-by: Allen Martin <amartin@nvidia.com>