sched: change sleep api for __migration_entry_wait [1/1]
PD#TV-7519
Problem:
schedule_timeout did not really make task sleep. It will cause
rt thread bug when this thread is waiting for a cma page migrated:
sched: RT throttling activated for rt_rq
eaf671b8 (cpu 1)
potential CPU hogs:
btu message loo (4253)
[<
c037d5b8>] task_tick_rt+0x0/0x120
[<
c037d914>] pick_next_task_rt+0x1cc/0x1e4
[<
c0fa8534>] __schedule+0x598/0x91c
[<
c0fa891c>] schedule+0x64/0xc4
[<
c0fac134>] schedule_timeout+0x1dc/0x47c
[<
c0493ba4>] __migration_entry_wait+0x168/0x194
~~~~~blocked here
[<
c0493c20>] migration_entry_wait+0x50/0x54
[<
c0473008>] do_swap_page+0x404/0x4e8
[<
c047357c>] handle_mm_fault+0x1ec/0xa60
[<
c031a2f0>] do_page_fault+0x2d4/0x3a8
[<
c0301408>] do_PrefetchAbort+0x48/0xb0
[<
c030f78c>] ret_from_exception+0x0/0x34
Solution:
using usleep_range instead of schedule_timeout
Verify:
t905x
Change-Id: I908022b747ad921b5863af377291abdf06672f15
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>