android_kernel_oneplus_msm8998/kernel/sched
Pavankumar Kondeti f67dcbea7f sched: Fix deadlock between cpu hotplug and upmigrate change
There is a circular dependency between cpu_hotplug.lock and
HMP scheduler policy mutex. Prevent this by enforcing the
same lock order.

Here CPU0 and CPU4 are governed by different cpufreq policies.

----------------                        --------------------
    CPU 0                                          CPU 4
---------------                         --------------------

proc_sys_call_handler()                 cpu_up()

                                        --> acquired cpu_hotplug.lock

sched_hmp_proc_update_handler()         cpufreq_cpu_callback()

--> acquired policy_mutex

                                        cpufreq_governor_interactive()

get_online_cpus()                       sched_set_window()

--> waiting for cpu_hotplug.lock        --> waiting for policy_mutex

Change-Id: I39efc394f4f00815b72adc975021fdb16fe6e30a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-12-30 12:31:01 +05:30
..
auto_group.c
auto_group.h
boost.c sched/hmp: Enhance co-location and scheduler boost features 2016-11-16 17:57:56 -08:00
clock.c watchdog: introduce touch_softlockup_watchdog_sched() 2016-05-05 15:05:52 -07:00
completion.c
core.c Merge "sched: Track average sleep time" 2016-12-19 17:04:55 -08:00
core_ctl.c sched: Ensure proper synch between isolation, hotplug, and suspend 2016-11-18 14:04:39 -08:00
cpuacct.c
cpuacct.h
cpudeadline.c
cpudeadline.h
cpufreq_sched.c FIXUP: sched: scheduler-driven cpu frequency selection 2016-09-14 15:02:22 +05:30
cpupri.c
cpupri.h
cputime.c Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
deadline.c Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
debug.c sched: Add the mechanics of top task tracking for frequency guidance 2016-10-17 12:43:55 -07:00
energy.c Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
fair.c Merge "sched: Avoid waking idle cpu for short-burst tasks" 2016-12-19 17:04:54 -08:00
features.h Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
hmp.c sched: Fix deadlock between cpu hotplug and upmigrate change 2016-12-30 12:31:01 +05:30
idle.c vmstat: make vmstat_updater deferrable again and shut down on idle 2016-09-14 15:02:22 +05:30
idle_task.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
loadavg.c sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems 2016-06-01 12:15:49 -07:00
Makefile Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
rt.c Merge "sched: Avoid waking idle cpu for short-burst tasks" 2016-12-19 17:04:54 -08:00
sched.h sched: Avoid packing tasks with low sleep time 2016-12-20 14:15:59 +05:30
sched_avg.c sched: Fix integer overflow in sched_update_nr_prod() 2016-10-04 08:47:48 +05:30
stats.c
stats.h
stop_task.c sched: Introduce Window Assisted Load Tracking (WALT) 2016-09-14 15:02:22 +05:30
tune.c sched/tune: remove duplicate allow_attach in schedtune_cgrp_subsys 2016-12-20 12:00:51 -08:00
tune.h sched/tune: Introducing a new schedtune attribute prefer_idle 2016-09-14 15:02:22 +05:30
wait.c
walt.c sched/walt: include missing header for arm_timer_read_counter() 2016-09-14 15:16:19 +05:30
walt.h sched/walt: Accounting for number of irqs pending on each core 2016-09-14 15:02:22 +05:30