[CPUFREQ] CPUfreq ondemand: update sampling rate without waiting for next sampling
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 29 Feb 2012 08:54:41 +0000 (17:54 +0900)
committerDave Jones <davej@redhat.com>
Thu, 1 Mar 2012 03:24:40 +0000 (22:24 -0500)
commitfd0ef7a0583b9af3efeb7b1f965ea80b5ff70cdf
tree3ed8deaecc23fd71d5c777c962c9833f071bc7e7
parent34ee55075265d68ca858f2426e165733664385b4
[CPUFREQ] CPUfreq ondemand: update sampling rate without waiting for next sampling

When a new sampling rate is shorter than the current one, (e.g., 1 sec
--> 10 ms) regardless how short the new one is, the current ondemand
mechanism wait for the previously set timer to be expired.

For example, if the user has just expressed that the sampling rate
should be 10 ms from now and the previous was 1000 ms, the new rate may
become effective 999 ms later, which could be not acceptable for the
user if the user has intended to speed up sampling because the system is
expected to react to CPU load fluctuation quickly from __now__.

In order to address this issue, we need to cancel the previously set
timer (schedule_delayed_work) and reset the timer if resetting timer is
expected to trigger the delayed_work ealier.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/cpufreq/cpufreq_ondemand.c
This page took 0.025284 seconds and 5 git commands to generate.