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

Skip to content
Commit bfc52594 authored by Ke Wang's avatar Ke Wang Committed by Todd Kjos
Browse files

ANDROID: sched/walt: Fix lockdep assert issue



commit c8d50e06 ("ANDROID: DEBUG: Temporarily disable lockdep
asserting on update_task_ravg") is a temporary commit to disable the
lockdep assert in walt_update_task_ravg(). The root cause is that there
are two paths enetering here without holding the rq lock in the pure
scheduler: one is move_queued_task(), another is detach_task().

Now fix this by making sure the rq lock is held at the two paths listed
above as it did in android4.4.

The following warning message occurs when enable lockdep_assert_held()
in walt_update_task_ravg():

[    0.850221] c3 WARNING: CPU: 3 PID: 28 at kernel/sched/walt.c:763 walt_update_task_ravg+0x28c/0x634
...
[    1.379256] c3 [<ffffff8008101038>] walt_update_task_ravg+0x28c/0x634
[    1.385587] c3 [<ffffff80081017f8>] walt_fixup_busy_time+0x108/0x404
[    1.392006] c3 [<ffffff80080dc91c>] set_task_cpu+0x220/0x2a4
[    1.397639] c3 [<ffffff80080e48a8>] detach_task+0x60/0x74
[    1.402929] c3 [<ffffff80080e4c24>] active_load_balance_cpu_stop+0x2cc/0x350
[    1.410045] c3 [<ffffff800816582c>] cpu_stopper_thread+0xb0/0x118
[    1.416029] c3 [<ffffff80080d418c>] smpboot_thread_fn+0x214/0x258
[    1.422100] c3 [<ffffff80080cfd40>] kthread+0x128/0x130
[    1.427304] c3 [<ffffff8008084834>] ret_from_fork+0x10/0x18

Bug: 120440300
Change-Id: Id3da7ad0dbc9d0d316cd7365b96c3686daba0340
Signed-off-by: default avatarKe Wang <ke.wang@spreadtrum.com>
parent 578e66bf
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