[xen stable-4.9] cpufreq: only stop ondemand governor if already started

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[xen stable-4.9] cpufreq: only stop ondemand governor if already started

commit 308654c7658bd4d529d996ab674f89b014774d4d
Author:     Christopher Clark <[hidden email]>
AuthorDate: Mon Aug 28 11:38:56 2017 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Mon Aug 28 11:38:56 2017 +0200

    cpufreq: only stop ondemand governor if already started
    On CPUFREQ_GOV_STOP in cpufreq_governor_dbs, shortcut to
    return success if the governor is already stopped.
    Avoid executing dbs_timer_exit, to prevent tripping an assertion
    within a call to kill_timer on a timer that has not been prepared
    with init_timer, if the CPUFREQ_GOV_START case has not
    run beforehand.
    kill_timer validates timer state:
     * itself, via BUG_ON(this_cpu(timers).running == timer);
     * within active_timer, ASSERTing timer->status is within bounds;
     * within list_del, which ASSERTs timer inactive list membership.
    Patch is synonymous to an OpenXT patch produced at Citrix prior to
    June 2014.
    Signed-off-by: Christopher Clark <[hidden email]>
    Reviewed-by: Jan Beulich <[hidden email]>
    master commit: e7ec6f5f32cd2d0f723083cde3d7761c4e675f2c
    master date: 2017-08-10 12:35:50 +0200
 xen/drivers/cpufreq/cpufreq_ondemand.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/drivers/cpufreq/cpufreq_ondemand.c b/xen/drivers/cpufreq/cpufreq_ondemand.c
index 7fdba03..fe6c63d 100644
--- a/xen/drivers/cpufreq/cpufreq_ondemand.c
+++ b/xen/drivers/cpufreq/cpufreq_ondemand.c
@@ -273,6 +273,10 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event)
+        if ( !this_dbs_info->enable )
+            /* Already not enabled */
+            break;
generated by git-patchbot for /home/xen/git/xen.git#stable-4.9

Xen-changelog mailing list
[hidden email]