mm/vmalloc.c: fix __purge_vmap_area_lazy takes long time
The issue is that CTS case testIntermediateSurfaceRecording fails.
Camera thread is delayed because of ion-deferred-free thread which
takes long time. When the issue happens, _ion_buffer_destroy calls
__purge_vmap_area_lazy to free the vmap area in purge list, inside
__purge_vmap_area_lazy it calls flush_tlb_kernel_range(start, end)
before free the vmap area, but sometimes vmap areas may be far apart,
then the range=end-start will be very large due to vmalloc saving
feature and carveouts being used for vmalloc, and purge not aware of
this, flush_tlb_kernel_range will take long time in that case. Call
flush_tlb_all if range is bigger than VMALLOC_END-VMALLOC_START to
fix the issue.
Change-Id: Ifcd4f4b53accee4a92ae4d97e24e0da588229671
Signed-off-by:
Qingqing Zhou <qqzhou@codeaurora.org>
Loading
Please register or sign in to comment