mali_kbase: bail out shrinking if the lock is contended

If the mmu_lock is contended for a long time in shrinking process
under kswapd context(e.g., lock holder was cpu.share limited
so it took 100ms to release the lock), kswapd is stuck on the lock.
It's not good because it causes more memory pressure in the system.

This patch makes the shrinking functino aware of kswapd context
to bail out if it's the case for kswapd to proceed reclaiming
with other reclaimable memory.

Bug: 201414237
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: Id9e08873def1cf63022937b88af45531d76e2d96
1 file changed
tree: 796532c656e853786c6d272c2bd6ed0665d5208c
  1. common/
  2. mali_kbase/
  3. mali_pixel/