diff options
| author | Dmitry Torokhov <dtor@chromium.org> | 2015-02-04 13:54:48 -0800 |
|---|---|---|
| committer | Amit Pundir <amit.pundir@linaro.org> | 2016-04-07 16:50:07 +0530 |
| commit | 02018626853b6dd6dee77d1e1befeaf2d6a8098e (patch) | |
| tree | f02b13b5eb3df7958d24a884be1e2cddd5bcf1df /tools/perf/util/parse-events.c | |
| parent | 73a20ae3132fc35ba83b6c622fc60b8fc9fe7589 (diff) | |
cpufreq: interactive: fix policy locking
cpufreq_interactive_speedchange_task() is running as a separate kernel
thread and is calling __cpufreq_driver_target(), which requires callers
to hold policy->rwsem for writing to prevent racing with other parts of
the kernel trying to adjust the frequency, for example kernel thermal
throttling. Let's change the code to take policy->rwsem and while at it
refactor the code a bit.
This was originally 2 changes reviewed at:
https://chromium-review.googlesource.com/246273
https://chromium-review.googlesource.com/256120
Change-Id: Icc2d97c6c1b929acd2ee32e8c81d81fd2af778ab
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@google.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
0 files changed, 0 insertions, 0 deletions
