ion: optimize ion_heap_buffer_zero
ion_heap_buffer_zero can spend a long time in unmap_kernel_range if it has to broadcast a tlb flush to every cpu for every page. Modify it to batch pages into a larger region to clear using a single mapping. This may cause the mapping size to change if the buffer size is not a multiple of the mapping size, so switch to allocating the address space for each chunk. This allows us to use vm_map_ram to handle the allocation and mapping together. The number of pages to zero using a single mapping is set to 32 to hit the fastpath in vm_map_ram. Change-Id: I1accfe67b285cbc9e95e387bea4246864197827d Signed-off-by:Colin Cross <ccross@android.com> Git-commit: fc04e484c319b8df647886d4cf17f7c450453d1d Git-repo: http://android.googlesource.com/kernel/common/ Signed-off-by:
Mitchel Humpherys <mitchelh@codeaurora.org>
Loading
Please register or sign in to comment