Commit d74a177
Liang Chen
cpufreq: interactive: fix deadlock
up_read() may wakeup some tasks, so do not call up_read() in scheduler,
or it will cause deadlock as below:
Thread #4 5 (Name: cpu3, state: debug-request) (Suspended : Container)
queued_spin_lock_slowpath() at qspinlock.c:369 0xffffff8008119120
queued_spin_lock() at qspinlock.h:88 0xffffff8008f0a470
do_raw_spin_lock() at spinlock.h:180 0xffffff8008f0a470
__raw_spin_lock() at spinlock_api_smp.h:143 0xffffff8008f0a470
_raw_spin_lock() at spinlock.c:144 0xffffff8008f0a470
rq_lock() at sched.h:1,244 0xffffff80080f2f4c
ttwu_queue() at core.c:2,442 0xffffff80080f2f4c
try_to_wake_up() at core.c:2,658 0xffffff80080eb998
wake_up_q() at core.c:450 0xffffff80080eb6a8
rwsem_wake() at rwsem-xadd.c:703 0xffffff800811a44c
__up_read() at rwsem.h:107 0xffffff8008118930
up_read() at rwsem.c:122 0xffffff8008118930
cpufreq_task_boost() at cpufreq_interactive.c:1,449 0xffffff8008a4bdb4
enqueue_task_fair() at fair.c:5,285 0xffffff80080f7814
enqueue_task() at core.c:1,324 0xffffff80080ec15c
activate_task() at core.c:1,346 0xffffff80080ec15c
ttwu_activate() at core.c:2,240 0xffffff80080f2fc0
ttwu_do_activate() at core.c:2,299 0xffffff80080f2fc0
ttwu_queue() at core.c:2,444 0xffffff80080f2fc0
try_to_wake_up() at core.c:2,658 0xffffff80080eb998
wake_up_q() at core.c:450 0xffffff80080eb6a8
futex_wake() at futex.c:1,636 0xffffff8008159e78
do_futex() at futex.c:3,714 0xffffff8008158fb0
__do_sys_futex() at futex.c:3,770 0xffffff800815bd98
__se_sys_futex() at futex.c:3,738 0xffffff800815bd98
__arm64_sys_futex() at futex.c:3,738 0xffffff800815bd98
__invoke_syscall() at syscall.c:36 0xffffff8008098d6c
invoke_syscall() at syscall.c:48 0xffffff8008098d6c
el0_svc_common() at syscall.c:117 0xffffff8008098d6c
el0_svc_handler() at syscall.c:163 0xffffff8008098ccc
el0_svc() at entry.S:940 0xffffff8008083d08
Fixes: 205ed4e (cpufreq: interactive: introduce boost cpufreq interface for task)
Change-Id: I9607faa5ede3a662e7f2f55da29b08fc328f4d43
Signed-off-by: Liang Chen <cl@rock-chips.com>1 parent da3b23f commit d74a177
1 file changed
Lines changed: 41 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
1341 | 1342 | | |
1342 | 1343 | | |
1343 | 1344 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | 1345 | | |
1371 | 1346 | | |
1372 | 1347 | | |
| |||
1385 | 1360 | | |
1386 | 1361 | | |
1387 | 1362 | | |
1388 | | - | |
| 1363 | + | |
1389 | 1364 | | |
1390 | 1365 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1397 | 1371 | | |
| 1372 | + | |
1398 | 1373 | | |
1399 | 1374 | | |
1400 | 1375 | | |
| 1376 | + | |
1401 | 1377 | | |
1402 | 1378 | | |
1403 | 1379 | | |
1404 | 1380 | | |
1405 | 1381 | | |
1406 | 1382 | | |
1407 | 1383 | | |
1408 | | - | |
| 1384 | + | |
1409 | 1385 | | |
1410 | 1386 | | |
1411 | 1387 | | |
1412 | 1388 | | |
1413 | 1389 | | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1426 | 1397 | | |
1427 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1428 | 1404 | | |
| 1405 | + | |
| 1406 | + | |
1429 | 1407 | | |
1430 | 1408 | | |
1431 | 1409 | | |
1432 | 1410 | | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1433 | 1427 | | |
1434 | 1428 | | |
1435 | 1429 | | |
| |||
0 commit comments