summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
AgeCommit message (Collapse)Author
2013-03-01ENGR00251842 cpufreq:interactive:specify duration of CPU speed boost pulseLin Fuzhen
Add sysfs attribute boostpulse_duration for the duration of boosting CPUspeed in response to bootpulse events. Duration is specified in usecs, default 80ms. Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
2012-10-10ENGR00227653 Revert "Delay interactive governor to speed up kernel boot"Xinyu Chen
The updated interactive governor added input handler callbacks to capture the multitouch, touchpad device's connect/disconnect/report events. If using the interactive as default governor, the interactive's start command will be triggered when bringup each cpu cores, and the input handler will be registered. But at this time, the inputopen_work is not initialized until the late_initcall. This caused if there's a touch screen driver registered, and input handler connected callback be called, the queue work to inputopen_work will crash. This reverts commit 2c1d402e9b2f802e33ccb622f41527812cac386f. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
2012-09-29Merge branch 'jb' into imx_3.0.35_androidXinyu Chen
Conflicts: drivers/cpufreq/cpufreq_interactive.c fs/proc/base.c
2012-07-26ENGR00218274 CPUFREQ: fix conservative governor bugLin Fuzhen
When system not boot up all cores, such as adding max_cpus=n, n<NR_CPUS, then the conservative governor will increase the cpu frequncy to the highest freq and never get to down. Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
2012-07-25Merge remote branch 'fsl-linux-sdk/imx_3.0.35' into imx_3.0.35_androidXinyu Chen
Conflicts: arch/arm/configs/imx6_defconfig arch/arm/configs/imx6_updater_defconfig arch/arm/configs/imx6s_defconfig arch/arm/include/asm/dma-mapping.h arch/arm/kernel/smp.c arch/arm/mach-mx6/Kconfig arch/arm/mach-mx6/board-mx6dl_arm2.h arch/arm/mach-mx6/board-mx6dl_sabresd.h arch/arm/mach-mx6/board-mx6q_arm2.c arch/arm/mach-mx6/board-mx6q_arm2.h arch/arm/mach-mx6/board-mx6q_sabreauto.c arch/arm/mach-mx6/board-mx6q_sabreauto.h arch/arm/mach-mx6/board-mx6q_sabrelite.c arch/arm/mach-mx6/board-mx6q_sabresd.c arch/arm/mach-mx6/board-mx6q_sabresd.h arch/arm/mach-mx6/board-mx6sl_arm2.c arch/arm/mach-mx6/board-mx6sl_arm2.h arch/arm/mach-mx6/board-mx6solo_sabreauto.h arch/arm/mach-mx6/bus_freq.c arch/arm/mach-mx6/clock.c arch/arm/mach-mx6/clock_mx6sl.c arch/arm/mach-mx6/cpu.c arch/arm/mach-mx6/crm_regs.h arch/arm/mach-mx6/devices-imx6q.h arch/arm/mach-mx6/devices.c arch/arm/mach-mx6/mx6_anatop_regulator.c arch/arm/mach-mx6/pcie.c arch/arm/mach-mx6/system.c arch/arm/mm/dma-mapping.c arch/arm/plat-mxc/devices/Makefile arch/arm/plat-mxc/devices/platform-imx-dcp.c arch/arm/plat-mxc/devices/platform-imx-ocotp.c arch/arm/plat-mxc/devices/platform-imx-rngb.c arch/arm/plat-mxc/devices/platform-mxc_hdmi.c arch/arm/plat-mxc/include/mach/devices-common.h arch/arm/plat-mxc/include/mach/esdhc.h arch/arm/plat-mxc/include/mach/iomux-mx6dl.h arch/arm/plat-mxc/include/mach/iomux-mx6q.h arch/arm/plat-mxc/include/mach/memory.h arch/arm/plat-mxc/include/mach/mx6.h arch/arm/plat-mxc/include/mach/mxc_edid.h arch/arm/plat-mxc/include/mach/mxc_hdmi.h arch/arm/plat-mxc/system.c drivers/Kconfig drivers/char/hw_random/fsl-rngc.c drivers/cpufreq/Makefile drivers/cpufreq/cpufreq_interactive.c drivers/crypto/Kconfig drivers/crypto/caam/caamalg.c drivers/crypto/caam/compat.h drivers/crypto/caam/ctrl.c drivers/crypto/caam/desc_constr.h drivers/crypto/caam/intern.h drivers/crypto/dcp.c drivers/dma/pch_dma.c drivers/input/keyboard/gpio_keys.c drivers/input/touchscreen/egalax_ts.c drivers/input/touchscreen/max11801_ts.c drivers/media/video/mxc/capture/Kconfig drivers/media/video/mxc/capture/adv7180.c drivers/media/video/mxc/capture/ipu_csi_enc.c drivers/media/video/mxc/capture/ipu_prp_vf_sdc.c drivers/media/video/mxc/capture/ipu_prp_vf_sdc_bg.c drivers/media/video/mxc/capture/mxc_v4l2_capture.c drivers/media/video/mxc/capture/ov5640_mipi.c drivers/media/video/mxc/output/mxc_vout.c drivers/misc/Kconfig drivers/misc/Makefile drivers/mmc/card/block.c drivers/mmc/core/mmc.c drivers/mmc/host/mmci.c drivers/mmc/host/sdhci-esdhc-imx.c drivers/mmc/host/sdhci.c drivers/mmc/host/sdhci.h drivers/mxc/Kconfig drivers/mxc/Makefile drivers/mxc/asrc/mxc_asrc.c drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c drivers/mxc/ipu3/ipu_device.c drivers/mxc/vpu/mxc_vpu.c drivers/net/fec.c drivers/net/wireless/Makefile drivers/power/sabresd_battery.c drivers/regulator/core.c drivers/tty/serial/imx.c drivers/usb/core/hub.c drivers/usb/gadget/arcotg_udc.c drivers/usb/gadget/fsl_updater.c drivers/usb/gadget/inode.c drivers/usb/host/ehci-hub.c drivers/video/mxc/ldb.c drivers/video/mxc/mipi_dsi.c drivers/video/mxc/mxc_dispdrv.c drivers/video/mxc/mxc_dispdrv.h drivers/video/mxc/mxc_edid.c drivers/video/mxc/mxc_elcdif_fb.c drivers/video/mxc/mxc_ipuv3_fb.c drivers/video/mxc/mxc_spdc_fb.c drivers/video/mxc_hdmi.c drivers/watchdog/imx2_wdt.c fs/proc/base.c include/linux/mmc/host.h include/linux/mmc/sdhci.h include/linux/mxc_v4l2.h kernel/power/main.c sound/soc/codecs/mxc_hdmi.c sound/soc/codecs/mxc_spdif.c sound/soc/codecs/wm8962.c sound/soc/imx/Kconfig sound/soc/imx/Makefile sound/soc/imx/imx-cs42888.c sound/soc/imx/imx-esai.c sound/soc/imx/imx-wm8958.c sound/soc/imx/imx-wm8962.c
2012-07-25ENGR00215955 cpufreq interactive mx6: set cpufreq lowest point if cpu idlingRobin Gong
Consider the below scenario: there is one CPU enter idle state before switch happen, and the CPU frequency is set on high point(1G with userspace cpufreq profile). After cpufreq profile is switched to interactive, all of the cpus's target_freq will be set to the current CPU frequency 1G. Then after one sample window, interactive profile will revalue the current cpu loading in every cpu(except idle cpu), and get the desired frequency and compared with target_freq to decide up or down frequency. Until all of cpus's target_freq is lower than desired frequency , down frequency will happen. But the idle CPU's frequency has been set on 1G , so cpu frequency miss the chance to set lower cpu frequency , although there is no loading in all of cpus.CPU frequency will be down unless the idled CPU exit idle to revalue cpu loading and get the right target_freq, in the worst case, it will never happen. Now we can do this: If we judge cpu idle state and set taget_freq to lowest frequency when switch to interactive, then CPU frequency modify will never be blocked on idled CPU. Signed-off-by: Robin Gong <B38343@freescale.com>
2012-07-20ENGR00180686 [CPUFreq]Delay interactive governor to speed up kernel bootAnson Huang
Interactive governor is too early to start, and kernel boot up speed is impacted, use late_initcall instead of fs_initcall. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-07-20ENGR00178646-1 [CPUFreq]Fix interactive governor bugAnson Huang
1. When system not boot up all cores, interactive governor will not work; 2. Adjust the default timer_rate to 50ms instead of 20ms to avoid too many freq up/down change. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-07-20ENGR00178118-1 fix some build warnings when using GCC 4.6.2Jason Liu
fix some build warnings when using GCC 4.6.2: drivers/cpufreq/cpufreq_interactive.c:127:6: warning:'irq_count' may be used uninitialized in this function [-Wuninitialized] drivers/media/video/mxc/output/mxc_vout.c:1346:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] drivers/video/mxc/mxc_ipuv3_fb.c:1329:23: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] drivers/video/mxc/mxc_ipuv3_fb.c:1376:24: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] drivers/video/mxc/mxc_ipuv3_fb.c:1377:24: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] Signed-off-by: Jason Liu <r64343@freescale.com>
2012-07-20ENGR00176177-2 Add irq count mechanism to interactive governorAnson Huang
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>
2012-07-20ENGR00177745-1 Add interactive cpufreq governorAnson Huang
cpufreq: interactive: New 'interactive' governor This governor is designed for latency-sensitive workloads, such as interactive user interfaces. The interactive governor aims to be significantly more responsive to ramp CPU quickly up when CPU-intensive activity begins. Existing governors sample CPU load at a particular rate, typically every X ms. This can lead to under-powering UI threads for the period of time during which the user begins interacting with a previously-idle system until the next sample period happens. The 'interactive' governor uses a different approach. Instead of sampling the CPU at a specified rate, the governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy from exiting idle to when the timer fires then we assume the CPU is underpowered and ramp to MAX speed. If the CPU was not sufficiently busy to immediately ramp to MAX speed, then the governor evaluates the CPU load since the last speed adjustment, choosing the highest value between that longer-term load or the short-term load since idle exit to determine the CPU speed to ramp to. A realtime thread is used for scaling up, giving the remaining tasks the CPU performance benefit, unlike existing governors which are more likely to schedule rampup work to occur after your performance starved tasks have completed. The tuneables for this governor are: /sys/devices/system/cpu/cpufreq/interactive/min_sample_time: The minimum amount of time to spend at the current frequency before ramping down. This is to ensure that the governor has seen enough historic CPU load data to determine the appropriate workload. /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load The CPU load at which to ramp to max speed. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-05-25Merge remote branch 'fsl-linux-sdk/imx_3.0.15' into imx_3.0.15_androidXinyu Chen
Conflicts: arch/arm/configs/imx6_defconfig arch/arm/kernel/smp.c arch/arm/mach-mx6/board-mx6q_arm2.c arch/arm/mach-mx6/board-mx6q_sabreauto.c arch/arm/mach-mx6/board-mx6q_sabrelite.c arch/arm/mach-mx6/board-mx6q_sabresd.c arch/arm/mach-mx6/bus_freq.c arch/arm/mach-mx6/clock.c arch/arm/mach-mx6/cpu.c arch/arm/mach-mx6/devices-imx6q.h arch/arm/mach-mx6/mx6_ddr_freq.S arch/arm/mach-mx6/mx6_mmdc.c arch/arm/mach-mx6/mx6_suspend.S arch/arm/mach-mx6/mx6_wfi.S arch/arm/mach-mx6/plat_hotplug.c arch/arm/mach-mx6/pm.c arch/arm/mach-mx6/system.c arch/arm/plat-mxc/cpufreq.c arch/arm/plat-mxc/system.c drivers/media/video/mxc/capture/Kconfig drivers/media/video/mxc/capture/mxc_v4l2_capture.c drivers/media/video/mxc/capture/ov5640_mipi.c drivers/media/video/mxc/output/mxc_vout.c drivers/mmc/host/sdhci.c drivers/mtd/nand/gpmi-nand/gpmi-lib.c drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c drivers/mxc/ipu3/vdoa.c drivers/power/max8903_charger.c drivers/video/mxc/mxc_ipuv3_fb.c sound/soc/codecs/mxc_spdif.c sound/soc/imx/Makefile sound/soc/imx/imx-wm8962.c
2012-05-10cpufreq: interactive: restart above_hispeed_delay at each hispeed loadTodd Poynor
Change-Id: I2e5b91d45e8806b0ab94ca2301ed671c9af9ab13 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-05-08ENGR00180686 [CPUFreq]Delay interactive governor to speed up kernel bootAnson Huang
Interactive governor is too early to start, and kernel boot up speed is impacted, use late_initcall instead of fs_initcall. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-05-03cpufreq: interactive: add boost pulse interfaceTodd Poynor
Change-Id: Icf1e86d2065cc8f0816ba9c6b065eb056d4e8249 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-26cpufreq: interactive: set floor for boosted speedTodd Poynor
Allow speed to drop to flooor frequency but not below, don't pin to speed at last boost. Change-Id: I0147c2b7a2e61ba16820605af6baaf09570be787 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-24cpufreq: interactive: Add sysfs boost interface for hints from userspaceTodd Poynor
The explicit hint on/off version. Change-Id: Ibf62b6d45bf6fb8c9c055b9bdaf074ce9374c04f Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-23cpufreq: interactive: remove unused target_validate_time_in_idleTodd Poynor
Change-Id: I37c5085b91318242612440dfd775ad762996612f Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-23cpufreq: interactive: Boost frequency on touchscreen inputTodd Poynor
Based on previous patches by Tero Kristo <tero.kristo@nokia.com>, Brian Steuer <bsteuer@codeaurora.org>, David Ng <dave@codeaurora.org>, Antti P Miettinen <amiettinen@nvidia.com>, and Thomas Renninger <trenn@suse.de> Change-Id: Ic55fedcf6f9310f43a7022fb88e23b0392122769 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-21cpufreq: Separate speed target revalidate time and initial set timeTodd Poynor
Allow speed drop after min_sample_time elapses from last time the current speed was last re-validated as appropriate for current load / input boost. Allow speed bump after min_sample_time (or above_hispeed_delay) elapses from the time the current speed was originally set. Change-Id: Ic25687a7a53d25e6544c30c47d7ab6f27a47bee8 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-20Merge branch 'android-3.0' into imx_3.0.15_androidXinyu Chen
Conflicts: drivers/cpufreq/cpufreq_interactive.c
2012-04-19cpufreq: interactive: based hispeed bump on target freq, not actualTodd Poynor
For systems that set a common speed for all CPUs, checking current speed here could bypass the intermediate hispeed bump decision for this CPU when another CPU was already at hispeed. This could result in an overly high setting (for all CPUs) in situations where all CPUs were about to drop to load levels that map to hispeed or below. Change-Id: I186f23dcfc5e2b6336cab8b0327f0c8a9a4482bc Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-19Merge linux-stable 3.0.28 into android-3.0Todd Poynor
Change-Id: Iee820738e53627f5d0447a87ceff34443aa72786 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-18cpufreq: interactive: adjust code and documentation to matchTodd Poynor
Change-Id: If59c668d514a29febe5c35404fd9d01df8548eb1 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-18cpufreq: interactive: configurable delay before raising above hispeedTodd Poynor
Change-Id: I4d6ac40b23a3790d48e30c37408284e9f955e8fa Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-09cpufreq: interactive: don't drop speed if recently at higher loadTodd Poynor
Apply min_sample_time to the last time the current target speed was originally requested or re-validated as appropriate for the current load, not to the time since the current speed was originally set. Avoids periodic dips in speed during bursty loads. Change-Id: I250bda657985de60373f9897cc41f480664d51a1 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-09cpufreq: interactive: set at least hispeed when above hispeed loadTodd Poynor
If load is above go_hispeed_load, always go to at least hispeed_freq, even when reducing speed from a higher speed, not just when jumping up from minimum speed. Avoids running at a lower than intended speed after a burst of even higher load. Change-Id: I5b9d2a15ba25ce609b21bac7c724265cf6838dee Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-09cpufreq: interactive: apply intermediate load to max speed not currentTodd Poynor
Evaluate spikes in load (below go_hispeed_load) against the maximum speed supported by the device, not the current speed (which tends to make it too difficult to raise speed to intermediate levels until very busy). Change-Id: Ib937006abf8bedb60891a739acd733e89b732ae0 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-09Merge remote branch 'fsl-linux-sdk/imx_3.0.15' into imx_3.0.15_androidXinyu Chen
2012-04-05ENGR00178646-1 [CPUFreq]Fix interactive governor bugAnson Huang
1. When system not boot up all cores, interactive governor will not work; 2. Adjust the default timer_rate to 50ms instead of 20ms to avoid too many freq up/down change. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-03-30Merge remote branch 'fsl-linux-sdk/imx_3.0.15' into imx_3.0.15_4.6.6Xinyu Chen
Conflicts: arch/arm/configs/imx6_defconfig arch/arm/configs/imx6_updater_defconfig arch/arm/mach-mx6/board-mx6q_sabreauto.c arch/arm/mach-mx6/board-mx6q_sabresd.c arch/arm/mach-mx6/clock.c arch/arm/mach-mx6/localtimer.c drivers/cpufreq/Makefile drivers/cpufreq/cpufreq_interactive.c drivers/input/keyboard/gpio_keys.c drivers/media/video/mxc/capture/Kconfig drivers/media/video/mxc/capture/mxc_v4l2_capture.c drivers/mmc/card/block.c drivers/mmc/host/sdhci-esdhc-imx.c drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c drivers/usb/otg/fsl_otg.c drivers/video/mxc/mxc_ipuv3_fb.c include/linux/fsl_devices.h include/linux/mmc/host.h sound/soc/imx/Kconfig sound/soc/imx/Makefile sound/soc/imx/imx-hdmi-dma.c sound/soc/imx/imx-wm8958.c
2012-03-27ENGR00178118-1 fix some build warnings when using GCC 4.6.2Jason Liu
fix some build warnings when using GCC 4.6.2: drivers/cpufreq/cpufreq_interactive.c:127:6: warning:'irq_count' may be used uninitialized in this function [-Wuninitialized] drivers/media/video/mxc/output/mxc_vout.c:1346:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] drivers/video/mxc/mxc_ipuv3_fb.c:1329:23: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] drivers/video/mxc/mxc_ipuv3_fb.c:1376:24: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] drivers/video/mxc/mxc_ipuv3_fb.c:1377:24: warning: operation on 'mxc_fbi->cur_ipu_buf' may be undefined [-Wsequence-point] Signed-off-by: Jason Liu <r64343@freescale.com>
2012-03-26ENGR00176177-2 Add irq count mechanism to interactive governorAnson Huang
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>
2012-03-26ENGR00177745-1 Add interactive cpufreq governorAnson Huang
cpufreq: interactive: New 'interactive' governor This governor is designed for latency-sensitive workloads, such as interactive user interfaces. The interactive governor aims to be significantly more responsive to ramp CPU quickly up when CPU-intensive activity begins. Existing governors sample CPU load at a particular rate, typically every X ms. This can lead to under-powering UI threads for the period of time during which the user begins interacting with a previously-idle system until the next sample period happens. The 'interactive' governor uses a different approach. Instead of sampling the CPU at a specified rate, the governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy from exiting idle to when the timer fires then we assume the CPU is underpowered and ramp to MAX speed. If the CPU was not sufficiently busy to immediately ramp to MAX speed, then the governor evaluates the CPU load since the last speed adjustment, choosing the highest value between that longer-term load or the short-term load since idle exit to determine the CPU speed to ramp to. A realtime thread is used for scaling up, giving the remaining tasks the CPU performance benefit, unlike existing governors which are more likely to schedule rampup work to occur after your performance starved tasks have completed. The tuneables for this governor are: /sys/devices/system/cpu/cpufreq/interactive/min_sample_time: The minimum amount of time to spend at the current frequency before ramping down. This is to ensure that the governor has seen enough historic CPU load data to determine the appropriate workload. /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load The CPU load at which to ramp to max speed. Signed-off-by: Anson Huang <b20788@freescale.com>
2012-02-17cpufreq interactive governor: event tracingTodd Poynor
Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-13powernow-k8: Fix indexing issueAndreas Herrmann
commit a8eb28480e9b637cc78b9aa5e08612ba97e1317a upstream. The driver uses the pstate number from the status register as index in its table of ACPI pstates (powernow_table). This is wrong as this is not a 1-to-1 mapping. For example we can have _PSS information to just utilize Pstate 0 and Pstate 4, ie. powernow-k8: Core Performance Boosting: on. powernow-k8: 0 : pstate 0 (2200 MHz) powernow-k8: 1 : pstate 4 (1400 MHz) In this example the driver's powernow_table has just 2 entries. Using the pstate number (4) as index into this table is just plain wrong. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13powernow-k8: Avoid Pstate MSR accesses on systems supporting CPBAndreas Herrmann
commit 201bf0f129e1715a33568d1563d9a75b840ab4d3 upstream. Due to CPB we can't directly map SW Pstates to Pstate MSRs. Get rid of the paranoia check. (assuming that the ACPI Pstate information is correct.) Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-10cpufreq: interactive governor: default 20ms timerTodd Poynor
Change-Id: Ie9952f07b38667f2932474090044195c57976faa Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-10cpufreq: 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-09cpufreq: interactive governor: scale to max only if at min speedTodd Poynor
Change-Id: Ieffb2aa56b5290036285c948718be7be0d3af9e8 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-11-09cpufreq: 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-10-27Merge commit 'v3.0.8' into android-3.0Colin Cross
2011-10-20power: 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-10-16cpufreq: 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-10-05cpufreq: 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-10-03drivers/cpufreq/pcc-cpufreq.c: avoid NULL pointer dereferenceNaga Chumbalkar
commit e71f5cc402ecb42b407ae52add7b173bf1c53daa upstream. per_cpu(processors, n) can be NULL, resulting in: Loading CPUFreq modules[ 437.661360] BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffffa0434314>] pcc_cpufreq_cpu_init+0x74/0x220 [pcc_cpufreq] It's better to avoid the oops by failing the driver, and allowing the system to boot. Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-15cpufreq: 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-07-19cpufreq: 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-07-15cpufreq: interactive: cleanup checkpatch warningsAllen Martin
Cleanup some style warnings reported by checkpatch Change-Id: Ie2e6903d52867fb3347e009d7efa3bc4ca755cea Signed-off-by: Allen Martin <amartin@nvidia.com>
2011-07-15cpufreq: 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>