• MyungJoo Ham's avatar
    [CPUFREQ] CPUfreq ondemand: update sampling rate without waiting for next sampling · fd0ef7a0
    MyungJoo Ham authored
    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: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    fd0ef7a0
cpufreq_ondemand.c 22.5 KB