mm: give up CPU when swap cache in inconsistence state
The case is for __read_swap_cache_async():
If swap cache is deleted by __delete_from_swap_cache(), but
SWAP_HAS_CACHE flag not cleared yet by swapcache_free(). eg,
when sched out in delete_from_swap_cache(), or __remove_mapping().
In the mean time, current process unfortunately is RT,
then cond_sched() may not working. Introduce using usleep(500, 1000)
to give up CPU to another task.
CRs-Fixed: 2285534
Change-Id: Icf55fc2b01d95a552d3f3651c2d78d115fd17b1f
Signed-off-by:
Zhenhua Huang <zhenhuah@codeaurora.org>
Loading
Please register or sign in to comment