Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4ed5dc0 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Syed Rameez Mustafa
Browse files

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
[rameezmustafa@codeaurora.org: Remove sched_enable_hmp check]
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent b8b70135
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment